Jump to content

Vehicles get damaged when spawning in


82ndAB_Bravo17

Recommended Posts

We have noticed that vehicles can take a lot of damage when they spawn in, which over a couple or more restarts can cause them to be destroyed and seem to vanish. I had a fully repaired Hunter in a garage yesterday, and it became almost 75% destroyed in just one restart. When I checked it and  repaired it five minutes before the next restart it spawned in afterwards with about 25% damage.

http://steamcommunity.com/sharedfiles/filedetails/?id=692598678

I guess that this is caused when the vehicles move during their final placement in the world and collide with the objects that are already there.

Perhaps a way to stop his would be for the vehicles to be spawned in fully repaired, and apply the correct damage only after they have settled into their final position - maybe a one or two second delay or something like that?

 

 

Link to comment
Share on other sites

I have been going through Epoch's server code recently in order to resolve some issues and I just this morning noticed this line in EPOCH_load_vehicles.sqf"

_immuneVehicleSpawn = [_serverSettingsConfig, "immuneVehicleSpawn", false] call EPOCH_fnc_returnConfigEntry;

Now, in the loop spawning vehicles, there is this block:

					if (_immuneVehicleSpawn) then{
						_vehicle allowDamage false;
					};

Then you get this at the end:

// re-enable damage to vehicles after we wait
if (_immuneVehicleSpawn) then{
	_immuneVehicleSpawnTime = [_serverSettingsConfig, "immuneVehicleSpawnTime", 120] call EPOCH_fnc_returnConfigEntry;
	[_allVehicles,_immuneVehicleSpawnTime] spawn{
		sleep (_this select 1);
		{_x allowDamage true} count (_this select 0);
	};
};

So what I'm thinking is that in EpochConfig.hpp I could have the following two lines perhaps:

immunevehiclespawn = true;
immunevehiclespawntime =120;

And protect all vehicles on the server for two minutes after spawning them at server start? 

Link to comment
Share on other sites

I'll be adding it for the 1100EDT restart so long as work doesn't get in the way, otherwise at the 1500EDT one and will report back here. Basically I'll set the limit to a decent enough interval and try to blow up one of my own vehicles... :blink:

EDIT: Set delay for four minutes but then got caught by the loading player inventory hang (twice). I'll increase time for 1500EDT restart. Can at least confirm (obviously) that vehicles can be damaged after four minutes... but that's really not the important thing...

Link to comment
Share on other sites

Great news. I can confirm that this does God Mode vehicles for the time specified. I put a Beta-C mag of 5.56mm STANAG into a Hello Kitty VW (in a way I was hoping it wouldn't work)... In addition, if you unlock the vehicle before the timer has expired then the vehicle can at that point be damaged. I can see putting on a long timer and only taking off God Mode when a player is online and has got in the vehicle, maybe.

For the moment I cannot definitely confirm that it would resolve the restart vehicle/wall problems, but don't see why not. Quite pleased with this actually :rolleyes:

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...