Partly fix floating loot

This commit fixes partly the floating loot issue. The whole problem is not fixable. It is a problem with different components. The main point is that the position can be half water and half not. The second is the building collision and the collision of the loot object. Normally setPosATL should do its work but the object moves on the placement. Adding a special handling for buildings that are mostly over water did the best job so far.
With fixWaterPos = 1; in the building class which has those floating loot problems, the position gets converted to ASL which is better over water but not always. Some loot objects are still floating a bit but I could reach all of them. It is a way better as before.
This commit is contained in:
AirwavesMan
2020-09-15 19:55:17 +02:00
parent 7f86b09f4c
commit 89bca2c94b
7 changed files with 84 additions and 41 deletions

View File

@@ -4,6 +4,7 @@ Spawns randomly selected loot from given group.
Parameters:
integer Loot group index in dayz_lootGroups
vector Spawn position relative to world
class Classname of the object
Return value:
object Spawned vehicle.
@@ -14,5 +15,5 @@ Author:
#include "Loot.hpp"
Loot_Spawn(Loot_Select(_this select 0, 1) select 0, _this select 1);
//[([_this select 0, 1] call loot_select) select 0, _this select 1] call loot_spawn
Loot_Spawn(Loot_Select(_this select 0, 1) select 0, _this select 1, _this select 2);
//[([_this select 0, 1] call loot_select) select 0, _this select 1, _this select 2] call loot_spawn