MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DoFrame

Method DoFrame

scripts/AIGame.cpp:3938–3954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3936}
3937
3938void Lance::DoFrame(int me) {
3939 float frame;
3940
3941 Obj_WBValue(me, 0, VF_GET, WBV_F_ANIM_FRAME, &frame);
3942
3943 if (frame > 2.0f && frame < 6.0f) {
3944 if (memory->mode == LANCE_MOVING) {
3945 int flags = AIF_DISABLE_FIRING;
3946 AI_Value(me, VF_SET_FLAGS, AIV_I_FLAGS, &flags);
3947 memory->mode = LANCE_PAUSED;
3948 }
3949 } else if (memory->mode == LANCE_PAUSED) {
3950 int flags = AIF_DISABLE_FIRING;
3951 AI_Value(me, VF_CLEAR_FLAGS, AIV_I_FLAGS, &flags);
3952 memory->mode = LANCE_MOVING;
3953 }
3954}
3955
3956int16_t Lance::CallEvent(int event, tOSIRISEventInfo *data) {
3957 switch (event) {

Callers

nothing calls this directly

Calls 15

Obj_WBValueFunction · 0.85
Obj_ValueFunction · 0.85
Obj_BurningFunction · 0.85
Sound_Play3dFunction · 0.85
Obj_GetGunPosFunction · 0.85
Obj_CreateFunction · 0.85
Obj_SetCustomAnimFunction · 0.85
Player_ValueFunction · 0.85
Room_ValueFunction · 0.85
AI_GoalValueFunction · 0.85
AI_GetNearbyObjsFunction · 0.85
AI_FindObjOfTypeFunction · 0.85

Tested by

no test coverage detected