TribesNext

Welcome, Guest. Please login or register.
Did you miss your activation email?


TribesNext >  TribesNext.com Forums >  Support >  Server Support >  Tank UE' Fix Possible! « previous next »
Pages: [1] Print
Author Topic: Tank UE' Fix Possible!
({STAR})earthinhabitant
Seņor Nugget

Posts: 227

View Profile WWW
June 05, 2014, 03:48:40 AM »
DX Dark Dragon was kind enough to help look into the rumors of a UE bug and is under the impression it resides in line 260 of vehicle.cs  and replacing with this file, will resolve.

We have not tried on live server to see it works, yet... to confirm.

http://pastebin.com/sHDTwbUj


Blakhart
Juggernaught
Posts: 1625

View Profile
1: June 05, 2014, 05:43:45 AM »
"This paste has been removed!"
Ragora
Seņor Nugget

Posts: 221

View Profile WWW
2: June 05, 2014, 06:48:14 AM »
"This paste has been removed!"

Didn't realize he was going to paste the link I gave him, as I only set it to last like an hour. I made a new one set for a week: http://pastebin.com/cuSTRL1Y

The fix is experimental, as it's only implementing a thing that Meltdown 2 and BIOMod did to supposedly fix a similar issue which is to teleport the vehicle away upon being destroyed as I was told by a friend that the issue deals with clients touching the clientside ghost of the vehicle when it is destroyed which is somehow causing a crash.

Basically, this is all it needed to modify in scripts/vehicles/vehicle.cs:

Code:
function VehicleData::onDestroyed(%data, %obj, %prevState)
{
    if(%obj.lastDamagedBy)
    {
        %destroyer = %obj.lastDamagedBy;
        game.vehicleDestroyed(%obj, %destroyer);
        //error("vehicleDestroyed( "@ %obj @", "@ %destroyer @")");
    }
    
radiusVehicleExplosion(%data, %obj);
   if(%obj.turretObject)
      if(%obj.turretObject.getControllingClient())
         %obj.turretObject.getDataBlock().playerDismount(%obj.turretObject);
   for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++)
   {
      if (%obj.getMountNodeObject(%i)) {
         %flingee = %obj.getMountNodeObject(%i);
         %flingee.getDataBlock().doDismount(%flingee, true);
         %xVel = 250.0 - (getRandom() * 500.0);
         %yVel = 250.0 - (getRandom() * 500.0);
         %zVel = (getRandom() * 100.0) + 50.0;
         %flingVel = %xVel @ " " @ %yVel @ " " @ %zVel;
         %flingee.applyImpulse(%flingee.getTransform(), %flingVel);
         echo("got player..." @ %flingee.getClassName());
         %flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash);
      }
   }

   %data.deleteAllMounted(%obj);
   // -----------------------------------------------------------------------------------------
   // z0dd - ZOD - Czar, 6/24/02. Move this vehicle out of the way so nothing collides with it.
   if(%data.getName() $="BomberFlyer" || %data.getName() $="MobileBaseVehicle" || %data.getName() $="AssaultVehicle")
   {
     // %obj.setFrozenState(true);
      %obj.schedule(2000, "delete");
      //%data.schedule(500, 'onAvoidCollisions', %obj);
      %obj.schedule(500, "setPosition", vectorAdd(%obj.getPosition(), "40 -27 10000"));
   }
   else
   {
      %obj.setFrozenState(true);
      %obj.schedule(500, "delete");
   }
   // -----------------------------------------------------------------------------------------
}
« Last Edit: June 06, 2014, 10:48:56 AM by Liukcairo »

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Supposedly Einstein
({STAR})earthinhabitant
Seņor Nugget

Posts: 227

View Profile WWW
3: June 05, 2014, 07:14:37 AM »
thanks for posting the code up and if anyone at SCP is reading this and can apply the fix and bring back tanks...please do!

Blakhart
Juggernaught
Posts: 1625

View Profile
4: June 06, 2014, 10:40:18 AM »
I don't know if I have ever been touching a tank when I ue'd because of them but if it works hey it works.
Ragora
Seņor Nugget

Posts: 221

View Profile WWW
5: June 06, 2014, 10:42:14 AM »
I don't know if I have ever been touching a tank when I ue'd because of them but if it works hey it works.

It's pretty likely that it didn't have to be just you touching it. You'll probably crash if someone else touches it, along with them (likely the pilot or the gunner). But I am still waiting on getting this code in the new server to see if it alleviates the issue at all.

Note:

I just realized there was a syntax error. This new paste has the fixed version: http://pastebin.com/ynX1nR9x
« Last Edit: June 06, 2014, 10:52:16 AM by Liukcairo »

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Supposedly Einstein
Heat_
Nugget

Posts: 12

View Profile
6: December 22, 2014, 08:56:27 AM »
Is the code in the message body the updated code? The pastebins are all expired.
Blakhart
Juggernaught
Posts: 1625

View Profile
7: December 22, 2014, 12:53:35 PM »
Judging from the edit timestamps in the code paste, it may be. If he doesn't chime in just run it and see if the console says something about a syntax eror in line 260 of vehicle.cs.
Ragora
Seņor Nugget

Posts: 221

View Profile WWW
8: December 22, 2014, 06:42:15 PM »
Judging from the edit timestamps in the code paste, it may be. If he doesn't chime in just run it and see if the console says something about a syntax eror in line 260 of vehicle.cs.

Looks like I did go about and updated the code block on the forum at some point. Though still note it's not guaranteed as I made it from a hunch I got from what I was told about how BIOMod and MD2 alleviated what appeared to be same issue.

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Supposedly Einstein
Pages: [1] Print 
« previous next »
Jump to:  

irc.quakenet.org / #TribesNext Powered by SMF  © Simple Machines