Begin work on new tank busters, adjust init func
This commit is contained in:
@@ -94,5 +94,6 @@ public void OnGameFrame() {
|
||||
if(WeatherManager.TornadoWarning) WeatherManager.TickSiren();
|
||||
if (AudioManager.shouldTick) AudioManager.TickBGM();
|
||||
if (BossHandler.shouldTick) BossHandler.Tick();
|
||||
if (BossHandler.tickBusterNuclear) BossHandler.TickBusterNuclear();
|
||||
WeatherManager.TickFog();
|
||||
}
|
||||
|
@@ -7,9 +7,11 @@ enum struct BOSSHANDLER {
|
||||
bool shouldTick;
|
||||
bool shouldTickBGM;
|
||||
bool tickBuster;
|
||||
bool tickBusterNuclear;
|
||||
float fAng[3];
|
||||
float fPos[3];
|
||||
int bustTarget;
|
||||
int bustNukeTarget;
|
||||
int iBossEnt;
|
||||
int iBossEntHealth;
|
||||
int iBossEntMaxHealth;
|
||||
@@ -233,6 +235,42 @@ enum struct BOSSHANDLER {
|
||||
CreateTimer(7.0, ResetTickBuster);
|
||||
}
|
||||
}
|
||||
//Tank buster thing
|
||||
void TickBusterNuclear(){
|
||||
float cPos[3]; //Client's Position
|
||||
float pPos[3]; //Ground Particle Target Position
|
||||
float sPos[3]; //Sign/Arrow's Target Position
|
||||
float rPos[3];
|
||||
float nPos[3];
|
||||
float fVelocity[3]; //Velocity for teleporting entities, used for angles as well so we don't need two vectors.
|
||||
int iAirParticle = FindEntityByTargetname("FB.TankBuster.AirParticle", "func_brush");
|
||||
int iBuster = FindEntityByTargetname("FB.TankBuster", "trigger_hurt");
|
||||
int iExploParticle = FindEntityByTargetname("FB.TankBuster.ExplodeParticle", "info_particle_system");
|
||||
int iParticle = FindEntityByTargetname("FB.TankBuster.GroundParticle", "info_particle_system");
|
||||
int iSign = FindEntityByTargetname("FB.TankBuster.Sign", "func_rotating");
|
||||
int iSpin = FindEntityByTargetname("FB.TankBuster.Spinner", "func_rotating");
|
||||
int iNukeTemplate = FindEntityByTargetname("PL.NukeCart", "env_entity_maker");
|
||||
GetClientAbsOrigin(this.bustNukeTarget, cPos);
|
||||
rPos[0] = cPos[0];
|
||||
rPos[1] = cPos[1];
|
||||
rPos[2] = cPos[2] + 50.0;
|
||||
pPos[0] = cPos[0];
|
||||
pPos[1] = cPos[1];
|
||||
pPos[2] = cPos[2] + 25.0;
|
||||
sPos[0] = cPos[0];
|
||||
sPos[1] = cPos[1];
|
||||
sPos[2] = cPos[2] + 150.0;
|
||||
nPos[0] = cPos[0];
|
||||
nPos[1] = cPos[1];
|
||||
nPos[2] = cPos[2] + 750.0;
|
||||
TeleportEntity(iAirParticle, rPos, fVelocity, fVelocity);
|
||||
TeleportEntity(iParticle, pPos, fVelocity, fVelocity);
|
||||
TeleportEntity(iExploParticle, pPos, fVelocity, fVelocity);
|
||||
TeleportEntity(iBuster, cPos, fVelocity, fVelocity);
|
||||
TeleportEntity(iSign, sPos, fVelocity, fVelocity);
|
||||
TeleportEntity(iSpin, pPos, fVelocity, fVelocity);
|
||||
TeleportEntity(iNukeTemplate, nPos, fVelocity, fVelocity);
|
||||
}
|
||||
//Boss was slain
|
||||
void TriggerDeath(){
|
||||
this.shouldTick = false;
|
||||
|
@@ -625,8 +625,10 @@ void sudo(int task) {
|
||||
case 305: {
|
||||
EmitSoundToAll(BGMArray[6].realPath, _, AudioManager.chanBGM, BGMArray[6].SNDLVL, SND_CHANGEVOL, 1.0, _, _, _, _, _, _);
|
||||
}
|
||||
case 420:{ //Init from Wave Null.
|
||||
case 420:{ //Init/Reset Wave Null.
|
||||
UpdateGamemode();
|
||||
FastFire2("Weather.Sky", "Skin", "3", 0.0, false);
|
||||
WeatherManager.fogDensity = 0.1;
|
||||
}
|
||||
case 421:{
|
||||
FastFire2("weather.sky", "Skin", "2", 0.0, false);
|
||||
@@ -644,6 +646,29 @@ void sudo(int task) {
|
||||
case 424:{
|
||||
AudioManager.ChangeBGM(31);
|
||||
}
|
||||
case 425:{
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (IsValidClient(i)) BossHandler.bustNukeTarget = i;
|
||||
}
|
||||
BossHandler.tickBusterNuclear = true;
|
||||
}
|
||||
case 426:{
|
||||
// FastFire2("NukeTankBusterThing", "ForceSpawn", "", 0.0, false);
|
||||
FastFire2("PL.CannonPitch", "SetPosition", "1.0", 0.0, false);
|
||||
FastFire2("PL.SentCart", "ForceSpawn", "", 5.0, false);
|
||||
FastFire2("PL.SentPhys", "Wake", "", 5.1, false);
|
||||
FastFire2("PL.CannonFodder", "Enable", "", 5.1, false);
|
||||
FastFire2("PL.CannonSND", "PlaySound", "", 5.1, false);
|
||||
FastFire2("PL.CannonFodder", "Disable", "", 5.3, false);
|
||||
FastFire2("PL.SentCartPhys", "Break", "", 6.0, false);
|
||||
}
|
||||
case 427:{
|
||||
FastFire2("PL.NukeCart", "ForceSpawn", "", 0.0, false);
|
||||
FastFire2("PL.NukeCartPhys", "Break", "", 1.25, false);
|
||||
FastFire2("PL.NukeCartParticle", "Start", "", 1.25, false);
|
||||
FastFire2("PL.NukeCartShake", "StartShake", "", 1.25, false);
|
||||
FastFire2("PL.NukeCartExplo", "Explode", "", 1.25, false);
|
||||
}
|
||||
//LOOP SYSTEM
|
||||
case 500: {
|
||||
AudioManager.indexBGM = 9;
|
||||
|
Reference in New Issue
Block a user