DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SetupTrapPlayer()

void ItemBase::SetupTrapPlayer ( PlayerBase player,
bool set_position = true )
inlineprotected

См. определение в файле TrapSpawnBase.c строка 225

226 {
227 if ( GetGame().IsServer() )
228 {
229 if ( set_position )
230 {
231 vector trapPos = player.GetPosition() + ( player.GetDirection() * 0.5 );
232 trapPos[1] = GetGame().SurfaceRoadY( trapPos[0], trapPos[2] );
233 SetPosition( trapPos );
234 }
235
236 SetDeployed( true );
237 }
238 }
proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)
void SetDeployed(bool newState)
Определения TrapSpawnBase.c:174
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:438

Перекрестные ссылки GetGame(), SetDeployed(), SetPosition() и CGame::SurfaceRoadY().

Используется в OnPlacementComplete().