MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / Process

Method Process

src/SB/Game/zNPCTypeBossPlankton.cpp:1107–1162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105}
1106
1107void zNPCBPlankton::Process(xScene* xscn, F32 dt)
1108{
1109 // This function needs a lot of work, writing most of these comments
1110 // so that i can resume where i left off when i return to it
1111
1112 // territory_data& t ;
1113 //xCollis& coll;
1114 xEnt* platform;
1115 S32 i;
1116
1117 //xVec3& player_loc;
1118 xPsyche* psy = psy_instinct;
1119
1120 if ((flag.updated == false) && (flag.updated = 1, played_intro == false))
1121 {
1122 zNPCBPlankton::say(0, 0, true);
1123 played_intro = true;
1124 }
1125 beam.update(dt);
1126 delay = delay + dt;
1127 if ((mode == 1) && (territory->fuse_detected = player_left_territory(), psy_instinct != 0))
1128 {
1129 stun_duration = 0.0f;
1130 psy_instinct->GoalSet(NPC_GOAL_BPLANKTONAMBUSH, 1);
1131 }
1132 // uvar1 = zNPCCommon::SomethingWonderful();
1133 //if ((uVar1 & 0x23) == 0)
1134 // {
1135 // psy_instinct->xPsyche::Timestep(dt, 0)
1136 // }
1137 if (flag.face_player = false)
1138 {
1139 // iVar4 = *(int *)(DAT_803c0c5c + 0x4c);
1140 // pfVar2 = (float *)location__13zNPCBPlanktonCFv(param_9);
1141 // param_3 = (double)*(float *)(iVar4 + 0x30);
1142 // param_2 = (double)(*(float *)(iVar4 + 0x38) - pfVar2[2]);
1143 // assign__5xVec2Fff((double)(float)(param_3 - (double)*pfVar2),param_2,(float *)(param_9 + 0x460));
1144 // normalize__5xVec2Fv((float *)(param_9 + 0x460));
1145 }
1146 update_follow(dt);
1147 update_turn(dt);
1148 update_move(dt);
1149 update_animation(dt); //uvar5 = update anim
1150 check_player_damage(); //uvar1 = check_player_damage
1151 if (psy_instinct != 0) //psy_instinct isnt right, needs (uvar1 & 0xff)
1152 {
1153 zEntPlayer_Damage(0, 1); //needs xBase* instead of 0
1154 }
1155 update_aim_gun(dt);
1156 update_dialog(dt);
1157 //bVar3 = visible__17xLaserBoltEmitterCFv(param_9 + 0x3b8);
1158 //if (bVar3) {
1159 // *(uint *)(param_9 + 0x234) = *(uint *)(param_9 + 0x234) | 2;
1160 //}
1161 //Process__10zNPCCommonFP6xScenef(param_1,param_9,param_10);
1162}
1163
1164S32 zNPCBPlankton::SysEvent(xBase* from, xBase* to, U32 toEvent, const F32* toParam,

Callers

nothing calls this directly

Calls 15

sayFunction · 0.85
player_left_territoryFunction · 0.85
update_followFunction · 0.85
update_moveFunction · 0.85
update_dialogFunction · 0.85
update_warm_upFunction · 0.85
update_cool_downFunction · 0.85
GoalSetMethod · 0.80
zEntPlayer_DamageFunction · 0.70
update_turnFunction · 0.50
update_animationFunction · 0.50
check_player_damageFunction · 0.50

Tested by

no test coverage detected