Move funcommands material and sound defs to gamedata (bug 6085, r=asherkin).
This commit is contained in:
parent
fdae6cf1b0
commit
217ca928d5
74
gamedata/funcommands.games.txt
Normal file
74
gamedata/funcommands.games.txt
Normal file
@ -0,0 +1,74 @@
|
||||
"Games"
|
||||
{
|
||||
"#default"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"SpriteBeam" "sprites/laser.vmt"
|
||||
"SpriteBeam2" "sprites/bluelight1.vmt"
|
||||
"SpriteExplosion" "sprites/sprite_fire01.vmt"
|
||||
"SpriteGlow" "sprites/blueglow2.vmt"
|
||||
"SpriteHalo" "sprites/halo01.vmt"
|
||||
|
||||
"SoundBlip" "buttons/blip1.wav"
|
||||
"SoundBeep" "buttons/button17.wav"
|
||||
"SoundFinal" "weapons/cguard/charging.wav"
|
||||
"SoundBoom" "weapons/explode3.wav"
|
||||
"SoundFreeze" "physics/glass/glass_impact_bullet4.wav"
|
||||
}
|
||||
}
|
||||
|
||||
"csgo"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"SpriteBeam" "sprites/laserbeam.vmt"
|
||||
"SpriteBeam2" "sprites/physbeam.vmt"
|
||||
"SpriteExplosion" ""
|
||||
"SpriteGlow" "sprites/blueflare1.vmt"
|
||||
"SpriteHalo" "sprites/glow01.vmt"
|
||||
}
|
||||
}
|
||||
|
||||
"$INSURGENCY" // Standalone game
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"SpriteBeam" "sprites/laserbeam.vmt"
|
||||
"SpriteBeam2" ""
|
||||
"SpriteExplosion" "sprites/sprite_fire01.vmt"
|
||||
"SpriteGlow" ""
|
||||
"SpriteHalo" "sprites/glow01.vmt"
|
||||
}
|
||||
}
|
||||
|
||||
"swarm"
|
||||
{
|
||||
"Keys"
|
||||
{
|
||||
"SpriteBeam" "sprites/laserbeam.vmt"
|
||||
"SpriteBeam2" ""
|
||||
"SpriteExplosion" "sprites/flamelet1.vmt"
|
||||
"SpriteGlow" "sprites/blueflare1.vmt"
|
||||
"SpriteHalo" "sprites/glow01.vmt"
|
||||
}
|
||||
}
|
||||
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "left4dead"
|
||||
"game" "left4dead2"
|
||||
}
|
||||
|
||||
"Keys"
|
||||
{
|
||||
"SpriteBeam" "sprites/laserbeam.vmt"
|
||||
"SpriteBeam2" "sprites/physbeam.vmt"
|
||||
"SpriteExplosion" "sprites/floorfire4_.vmt"
|
||||
"SpriteGlow" "sprites/blueflare1.vmt"
|
||||
"SpriteHalo" "sprites/glow01.vmt"
|
||||
}
|
||||
}
|
||||
}
|
@ -51,11 +51,11 @@ public Plugin:myinfo =
|
||||
new Handle:hTopMenu = INVALID_HANDLE;
|
||||
|
||||
// Sounds
|
||||
#define SOUND_BLIP "buttons/blip1.wav"
|
||||
#define SOUND_BEEP "buttons/button17.wav"
|
||||
#define SOUND_FINAL "weapons/cguard/charging.wav"
|
||||
#define SOUND_BOOM "weapons/explode3.wav"
|
||||
#define SOUND_FREEZE "physics/glass/glass_impact_bullet4.wav"
|
||||
new String:g_BlipSound[PLATFORM_MAX_PATH];
|
||||
new String:g_BeepSound[PLATFORM_MAX_PATH];
|
||||
new String:g_FinalSound[PLATFORM_MAX_PATH];
|
||||
new String:g_BoomSound[PLATFORM_MAX_PATH];
|
||||
new String:g_FreezeSound[PLATFORM_MAX_PATH];
|
||||
|
||||
// Following are model indexes for temp entities
|
||||
new g_BeamSprite = -1;
|
||||
@ -179,45 +179,65 @@ HookEvents( )
|
||||
|
||||
public OnMapStart()
|
||||
{
|
||||
PrecacheSound(SOUND_BLIP, true);
|
||||
PrecacheSound(SOUND_BEEP, true);
|
||||
PrecacheSound(SOUND_FINAL, true);
|
||||
PrecacheSound(SOUND_BOOM, true);
|
||||
PrecacheSound(SOUND_FREEZE, true);
|
||||
|
||||
new EngineVersion:sdkversion = GetEngineVersion();
|
||||
if (sdkversion == Engine_Left4Dead || sdkversion == Engine_Left4Dead2
|
||||
|| sdkversion == Engine_AlienSwarm || sdkversion == Engine_CSGO)
|
||||
new Handle:gameConfig = LoadGameConfigFile("funcommands.games");
|
||||
if (gameConfig == INVALID_HANDLE)
|
||||
{
|
||||
g_BeamSprite = PrecacheModel("materials/sprites/laserbeam.vmt");
|
||||
g_HaloSprite = PrecacheModel("materials/sprites/glow01.vmt");
|
||||
|
||||
// l4d, l4d2, and csgo have this. swarm does not.
|
||||
if (sdkversion != Engine_AlienSwarm)
|
||||
{
|
||||
g_BeamSprite2 = PrecacheModel("materials/sprites/physbeam.vmt");
|
||||
}
|
||||
|
||||
g_GlowSprite = PrecacheModel("materials/sprites/blueflare1.vmt");
|
||||
|
||||
if (sdkversion == Engine_Left4Dead || sdkversion == Engine_Left4Dead2)
|
||||
{
|
||||
g_ExplosionSprite = PrecacheModel("sprites/floorfire4_.vmt");
|
||||
}
|
||||
else if (sdkversion == Engine_AlienSwarm)
|
||||
{
|
||||
g_ExplosionSprite = PrecacheModel("sprites/flamelet1.vmt");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_BeamSprite = PrecacheModel("materials/sprites/laser.vmt");
|
||||
g_HaloSprite = PrecacheModel("materials/sprites/halo01.vmt");
|
||||
g_BeamSprite2 = PrecacheModel("sprites/bluelight1.vmt");
|
||||
g_GlowSprite = PrecacheModel("sprites/blueglow2.vmt");
|
||||
g_ExplosionSprite = PrecacheModel("sprites/sprite_fire01.vmt");
|
||||
SetFailState("Unable to load game config funcommands.games");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SoundBlip", g_BlipSound, sizeof(g_BlipSound)) && g_BlipSound[0])
|
||||
{
|
||||
PrecacheSound(g_BlipSound, true);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SoundBeep", g_BeepSound, sizeof(g_BeepSound)) && g_BeepSound[0])
|
||||
{
|
||||
PrecacheSound(g_BeepSound, true);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SoundFinal", g_FinalSound, sizeof(g_FinalSound)) && g_FinalSound[0])
|
||||
{
|
||||
PrecacheSound(g_FinalSound, true);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SoundBoom", g_BoomSound, sizeof(g_BoomSound)) && g_BoomSound[0])
|
||||
{
|
||||
PrecacheSound(g_BoomSound, true);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SoundFreeze", g_FreezeSound, sizeof(g_FreezeSound)) && g_FreezeSound[0])
|
||||
{
|
||||
PrecacheSound(g_FreezeSound, true);
|
||||
}
|
||||
|
||||
new String:buffer[PLATFORM_MAX_PATH];
|
||||
if (GameConfGetKeyValue(gameConfig, "SpriteBeam", buffer, sizeof(buffer)) && buffer[0])
|
||||
{
|
||||
g_BeamSprite = PrecacheModel(buffer);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SpriteBeam2", buffer, sizeof(buffer)) && buffer[0])
|
||||
{
|
||||
g_BeamSprite2 = PrecacheModel(buffer);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SpriteExplosion", buffer, sizeof(buffer)) && buffer[0])
|
||||
{
|
||||
g_ExplosionSprite = PrecacheModel(buffer);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SpriteGlow", buffer, sizeof(buffer)) && buffer[0])
|
||||
{
|
||||
g_GlowSprite = PrecacheModel(buffer);
|
||||
}
|
||||
|
||||
if (GameConfGetKeyValue(gameConfig, "SpriteHalo", buffer, sizeof(buffer)) && buffer[0])
|
||||
{
|
||||
g_HaloSprite = PrecacheModel(buffer);
|
||||
}
|
||||
|
||||
CloseHandle(gameConfig);
|
||||
}
|
||||
|
||||
public OnMapEnd()
|
||||
|
@ -91,27 +91,33 @@ public Action:Timer_Beacon(Handle:timer, any:value)
|
||||
new Float:vec[3];
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
|
||||
if (team == 2)
|
||||
if (g_BeamSprite > -1 && g_HaloSprite > -1)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, redColor, 10, 0);
|
||||
}
|
||||
else if (team == 3)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, blueColor, 10, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, greenColor, 10, 0);
|
||||
}
|
||||
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
|
||||
GetClientEyePosition(client, vec);
|
||||
EmitAmbientSound(SOUND_BLIP, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (team == 2)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, redColor, 10, 0);
|
||||
}
|
||||
else if (team == 3)
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, blueColor, 10, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_BeaconRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, greenColor, 10, 0);
|
||||
}
|
||||
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
if (g_BlipSound[0])
|
||||
{
|
||||
GetClientEyePosition(client, vec);
|
||||
EmitAmbientSound(g_BlipSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
@ -109,12 +109,18 @@ public Action:Timer_FireBomb(Handle:timer, any:value)
|
||||
if (g_FireBombTime[client] > 1)
|
||||
{
|
||||
color = RoundToFloor(g_FireBombTime[client] * (255.0 / GetConVarFloat(g_Cvar_FireBombTicks)));
|
||||
EmitAmbientSound(SOUND_BEEP, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_BeepSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_BeepSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
color = 0;
|
||||
EmitAmbientSound(SOUND_FINAL, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_FinalSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_FinalSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
}
|
||||
|
||||
SetEntityRenderColor(client, 255, color, color, 255);
|
||||
@ -123,13 +129,16 @@ public Action:Timer_FireBomb(Handle:timer, any:value)
|
||||
GetClientName(client, name, sizeof(name));
|
||||
PrintCenterTextAll("%t", "Till Explodes", name, g_FireBombTime[client]);
|
||||
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
if (g_BeamSprite > -1 && g_HaloSprite > -1)
|
||||
{
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FireBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FireBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, whiteColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FireBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FireBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, whiteColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
}
|
||||
return Plugin_Continue;
|
||||
}
|
||||
else
|
||||
@ -140,21 +149,27 @@ public Action:Timer_FireBomb(Handle:timer, any:value)
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
TE_SetupBeamRingPoint(vec, 50.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.5, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
vec[2] += 15;
|
||||
TE_SetupBeamRingPoint(vec, 40.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
vec[2] += 15;
|
||||
TE_SetupBeamRingPoint(vec, 30.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.7, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
vec[2] += 15;
|
||||
TE_SetupBeamRingPoint(vec, 20.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.8, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
if (g_BeamSprite > -1 && g_HaloSprite > -1)
|
||||
{
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
TE_SetupBeamRingPoint(vec, 50.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.5, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
vec[2] += 15;
|
||||
TE_SetupBeamRingPoint(vec, 40.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
vec[2] += 15;
|
||||
TE_SetupBeamRingPoint(vec, 30.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.7, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
vec[2] += 15;
|
||||
TE_SetupBeamRingPoint(vec, 20.0, GetConVarFloat(g_Cvar_FireBombRadius), g_BeamSprite, g_HaloSprite, 0, 10, 0.8, 30.0, 1.5, orangeColor, 5, 0);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
EmitAmbientSound(SOUND_BOOM, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_BoomSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_BoomSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
|
||||
IgniteEntity(client, GetConVarFloat(g_Cvar_BurnDuration));
|
||||
KillFireBomb(client);
|
||||
|
@ -51,9 +51,12 @@ FreezeClient(client, time)
|
||||
SetEntityMoveType(client, MOVETYPE_NONE);
|
||||
SetEntityRenderColor(client, 0, 128, 255, 192);
|
||||
|
||||
new Float:vec[3];
|
||||
GetClientEyePosition(client, vec);
|
||||
EmitAmbientSound(SOUND_FREEZE, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_FreezeSound[0])
|
||||
{
|
||||
new Float:vec[3];
|
||||
GetClientEyePosition(client, vec);
|
||||
EmitAmbientSound(g_FreezeSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
|
||||
g_FreezeTime[client] = time;
|
||||
g_FreezeSerial[client] = ++ g_Serial_Gen;
|
||||
@ -67,12 +70,15 @@ UnfreezeClient(client)
|
||||
|
||||
if (IsClientInGame(client))
|
||||
{
|
||||
new Float:vec[3];
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
GetClientEyePosition(client, vec);
|
||||
EmitAmbientSound(SOUND_FREEZE, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_FreezeSound[0])
|
||||
{
|
||||
new Float:vec[3];
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
GetClientEyePosition(client, vec);
|
||||
EmitAmbientSound(g_FreezeSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
|
||||
SetEntityMoveType(client, MOVETYPE_WALK);
|
||||
|
||||
@ -189,13 +195,13 @@ public Action:Timer_Freeze(Handle:timer, any:value)
|
||||
if (g_GlowSprite > -1)
|
||||
{
|
||||
TE_SetupGlowSprite(vec, g_GlowSprite, 0.95, 1.5, 50);
|
||||
TE_SendToAll();
|
||||
}
|
||||
else
|
||||
else if (g_HaloSprite > -1)
|
||||
{
|
||||
TE_SetupGlowSprite(vec, g_HaloSprite, 0.95, 1.5, 50);
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
TE_SendToAll();
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
@ -224,12 +230,18 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value)
|
||||
if (g_FreezeBombTime[client] > 1)
|
||||
{
|
||||
color = RoundToFloor(g_FreezeBombTime[client] * (255.0 / GetConVarFloat(g_Cvar_FreezeBombTicks)));
|
||||
EmitAmbientSound(SOUND_BEEP, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_BeepSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_BeepSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
color = 0;
|
||||
EmitAmbientSound(SOUND_FINAL, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_FinalSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_FinalSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
}
|
||||
|
||||
SetEntityRenderColor(client, color, color, 255, 255);
|
||||
@ -238,13 +250,16 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value)
|
||||
GetClientName(client, name, sizeof(name));
|
||||
PrintCenterTextAll("%t", "Till Explodes", name, g_FreezeBombTime[client]);
|
||||
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
if (g_BeamSprite > -1 && g_HaloSprite > -1)
|
||||
{
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FreezeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FreezeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, whiteColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FreezeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_FreezeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, whiteColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
}
|
||||
return Plugin_Continue;
|
||||
}
|
||||
else
|
||||
@ -255,7 +270,10 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value)
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
EmitAmbientSound(SOUND_BOOM, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_BoomSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_BoomSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
|
||||
KillFreezeBomb(client);
|
||||
FreezeClient(client, GetConVarInt(g_Cvar_FreezeDuration));
|
||||
@ -286,15 +304,19 @@ public Action:Timer_FreezeBomb(Handle:timer, any:value)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_BeamSprite2 > -1)
|
||||
if (g_HaloSprite > -1)
|
||||
{
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite2, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
if (g_BeamSprite2 > -1)
|
||||
{
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite2, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
TE_SendToAll();
|
||||
}
|
||||
else if (g_BeamSprite > -1)
|
||||
{
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
TE_SendToAll();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TE_SetupBeamPoints(vec, pos, g_BeamSprite, g_HaloSprite, 0, 1, 0.7, 20.0, 50.0, 1, 1.5, blueColor, 10);
|
||||
}
|
||||
TE_SendToAll();
|
||||
|
||||
FreezeClient(i, GetConVarInt(g_Cvar_FreezeDuration));
|
||||
}
|
||||
|
@ -102,12 +102,18 @@ public Action:Timer_TimeBomb(Handle:timer, any:value)
|
||||
if (g_TimeBombTime[client] > 1)
|
||||
{
|
||||
color = RoundToFloor(g_TimeBombTime[client] * (128.0 / GetConVarFloat(g_Cvar_TimeBombTicks)));
|
||||
EmitAmbientSound(SOUND_BEEP, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_BeepSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_BeepSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
color = 0;
|
||||
EmitAmbientSound(SOUND_FINAL, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_FinalSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_FinalSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
}
|
||||
|
||||
SetEntityRenderColor(client, 255, 128, color, 255);
|
||||
@ -116,13 +122,16 @@ public Action:Timer_TimeBomb(Handle:timer, any:value)
|
||||
GetClientName(client, name, sizeof(name));
|
||||
PrintCenterTextAll("%t", "Till Explodes", name, g_TimeBombTime[client]);
|
||||
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
if (g_BeamSprite > -1 && g_HaloSprite > -1)
|
||||
{
|
||||
GetClientAbsOrigin(client, vec);
|
||||
vec[2] += 10;
|
||||
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_TimeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_TimeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, whiteColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_TimeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 15, 0.5, 5.0, 0.0, greyColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
TE_SetupBeamRingPoint(vec, 10.0, GetConVarFloat(g_Cvar_TimeBombRadius) / 3.0, g_BeamSprite, g_HaloSprite, 0, 10, 0.6, 10.0, 0.5, whiteColor, 10, 0);
|
||||
TE_SendToAll();
|
||||
}
|
||||
return Plugin_Continue;
|
||||
}
|
||||
else
|
||||
@ -133,7 +142,10 @@ public Action:Timer_TimeBomb(Handle:timer, any:value)
|
||||
TE_SendToAll();
|
||||
}
|
||||
|
||||
EmitAmbientSound(SOUND_BOOM, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
if (g_BoomSound[0])
|
||||
{
|
||||
EmitAmbientSound(g_BoomSound, vec, client, SNDLEVEL_RAIDSIREN);
|
||||
}
|
||||
|
||||
ForcePlayerSuicide(client);
|
||||
KillTimeBomb(client);
|
||||
|
@ -137,7 +137,11 @@ CopyFiles('configs/sql-init-scripts/sqlite', 'addons/sourcemod/configs/sql-init-
|
||||
'update_admins-r1409.sql',
|
||||
]
|
||||
)
|
||||
CopyFiles('gamedata', 'addons/sourcemod/gamedata', ['sm-tf2.games.txt'])
|
||||
CopyFiles('gamedata', 'addons/sourcemod/gamedata',
|
||||
[ 'funcommands.games.txt',
|
||||
'sm-tf2.games.txt',
|
||||
]
|
||||
)
|
||||
CopyFiles('gamedata/sdkhooks.games', 'addons/sourcemod/gamedata/sdkhooks.games',
|
||||
[ 'common.games.txt',
|
||||
'engine.blade.txt',
|
||||
|
Loading…
Reference in New Issue
Block a user