MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / init

Method init

Engine/source/afx/afxMagicMissile.cpp:910–974  ·  view source on GitHub ↗

-------------------------------------------------------------------------- --------------------------------------

Source from the content-addressed store, hash-verified

908//--------------------------------------
909//
910void afxMagicMissile::init(bool on_server, bool on_client)
911{
912 mPhysicsWorld = NULL;
913
914 mTypeMask |= ProjectileObjectType | LightObjectType;
915
916 mLight = LightManager::createLightInfo();
917 mLight->setType( LightInfo::Point );
918
919 mLightState.clear();
920 mLightState.setLightInfo( mLight );
921
922 mCurrPosition.zero();
923 mCurrVelocity.set(0, 0, 1);
924
925 mCurrTick = 0;
926
927 mParticleEmitter = NULL;
928 mParticleWaterEmitter = NULL;
929 mSound = 0;
930
931 mProjectileShape = NULL;
932
933 mDataBlock = NULL;
934
935 choreographer = NULL;
936
937 if (on_server != on_client)
938 {
939 client_only = on_client;
940 server_only = on_server;
941 mNetFlags.clear(Ghostable | ScopeAlways);
942 if (client_only)
943 mNetFlags.set(IsGhost);
944 }
945 else
946 {
947 // note -- setting neither server or client makes no sense so we
948 // treat as if both are set.
949 mNetFlags.set(Ghostable | ScopeAlways);
950 client_only = server_only = false;
951 }
952
953 mCurrDeltaBase.zero();
954 mCurrBackDelta.zero();
955 collision_mask = 0;
956 prec_inc = 0.0f;
957
958 did_launch = false;
959 did_impact = false;
960
961 missile_target = NULL;
962 collide_exempt = NULL;
963
964 use_accel = false;
965
966 hover_attack_go = false;
967 hover_attack_tick = 0;

Callers 1

prepBatchRenderMethod · 0.45

Calls 5

setTypeMethod · 0.45
clearMethod · 0.45
setLightInfoMethod · 0.45
zeroMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected