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

Function zEntPlayer_SpringboardFX

src/SB/Game/zEntPlayer.cpp:4064–4115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4062}
4063
4064static void zEntPlayer_SpringboardFX(xEnt* ent, F32 dt)
4065{
4066 xVec3 temp1;
4067 xVec3 temp2;
4068 xParEmitterCustomSettings info;
4069
4070 if (globals.player.Jump_Springboard != NULL && ent->frame->vel.y >= 0.0f)
4071 {
4072 xVec3Copy(&temp1, (xVec3*)&ent->model->Mat->pos);
4073 temp1.y += 1.5f;
4074
4075 xVec3Copy(&temp2, (xVec3*)&ent->model->Mat->right);
4076
4077 temp2 *= 0.15f;
4078 xVec3Add(&temp1, &temp1, &temp2);
4079
4080 if (gPTankDisable)
4081 {
4082 static F32 sLastSpringboardBubbleEmit = 0.0f;
4083 sLastSpringboardBubbleEmit += dt;
4084
4085 if (!(sLastSpringboardBubbleEmit > 0.02f))
4086 {
4087 return;
4088 }
4089
4090 sLastSpringboardBubbleEmit = 0.0f;
4091
4092 info.custom_flags = 0x35E;
4093 info.pos = temp1;
4094 info.vel.x = 1.0f;
4095 info.vel.z = 0.0f;
4096 info.vel.y = 0.0f;
4097 info.vel_angle_variation = PI * 2.0f;
4098 info.rate.set(100.0f, 100.0f, 1.0f, 0);
4099 info.life.set(1.0f, 1.0f, 1.0f, 0);
4100
4101 F32 size = 0.15f * xurand() + 0.05f;
4102
4103 info.size_birth.set(size, size, 1.0f, 0);
4104
4105 size *= 1.2f;
4106 info.size_death.set(size, size, 1.0f, 0);
4107
4108 xParEmitterEmitCustom(sEmitSpinBubbles, dt, &info);
4109 }
4110 else
4111 {
4112 zFX_SpawnBubbleTrail((xVec3*)&globals.player.ent.model->Mat->pos, 3);
4113 }
4114 }
4115}
4116
4117static void getPadDefl(_tagPadAnalog* stick, class xVec2* v)
4118{

Callers

nothing calls this directly

Calls 6

xVec3CopyFunction · 0.85
xVec3AddFunction · 0.85
xurandFunction · 0.85
zFX_SpawnBubbleTrailFunction · 0.70
xParEmitterEmitCustomFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected