DayZ 1.24
Loading...
Searching...
No Matches
Magnum_Base Class Reference

Private Member Functions

override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 

Detailed Description

Definition at line 351 of file Magnum.c.

Member Function Documentation

◆ GetDebugActions()

override void Magnum_Base::GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprivate

Definition at line 353 of file Magnum.c.

354 {
355 super.GetDebugActions(outputList);
356
357 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, "", FadeColors.LIGHT_GREY));
359 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:424

References SAT_DEBUG_ACTION.

◆ OnAction()

override bool Magnum_Base::OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprivate

Definition at line 361 of file Magnum.c.

362 {
363 if (GetGame().IsServer())
364 {
365 if (action_id == EActions.SPIN)
366 {
367 const float animPhaseOffset = 0.167;
368
369 Magnum_Cylinder cylinder = Magnum_Cylinder.Cast(GetAttachmentByType(Magnum_Cylinder));
370 Magnum_Ejector ejector = Magnum_Ejector.Cast(GetAttachmentByType(Magnum_Ejector));
371
372 if (cylinder)
373 {
374 float animPhase = cylinder.GetAnimationPhase("Rotate_Cylinder");
375 if (animPhase + animPhaseOffset > 1.0)
376 {
377 animPhase -= 1.0;
378 cylinder.ResetAnimationPhase("Rotate_Cylinder", animPhase);
379 ejector.ResetAnimationPhase("Rotate_Ejector", animPhase);
380 }
381
382 cylinder.SetAnimationPhase("Rotate_Cylinder", animPhase);
383 ejector.ResetAnimationPhase("Rotate_Ejector", animPhase);
384 }
385 }
386 }
387
388 return super.OnAction(action_id, player, ctx);
389 }
proto native CGame GetGame()

References GetGame().


The documentation for this class was generated from the following file: