38
38
#define SOUND_LEVELUP "ui/bigreward.wav"
39
39
#define SOUND_AMMO "items/itempickup.wav"
40
40
#define SOUND_CROW "ambient/animal/crow_2.wav"
41
+ #define SOUND_EXPLOSIVE "weapons/hegrenade/explode5.wav"
42
+ #define SOUND_GIFT "ui/gift_drop.wav"
41
43
42
44
#define g_flSoH_rate 0.4
43
45
#define ZC_SMOKER 1
@@ -838,7 +840,7 @@ public OnPluginStart()
838
840
g_pCvarSaveStats = CreateConVar("lv_save_stats", "0", "保存奖励计数(进度)", FCVAR_NONE, true, 0.0, true, 1.0);
839
841
g_pCvarEquipment = CreateConVar("lv_enable_eq", "1", "是否开启装备功能", FCVAR_NONE, true, 0.0, true, 1.0);
840
842
g_pCvarSurvivorBot = CreateConVar("lv_survivor_bot", "0", "为生还者机器人生存随机属性.0=禁用.1/2/4/8/16=技能.32/64/128/256=装备.262144=怒气技(或许)\n512/1024/2048/4096=满级装备.8192/16384/32768/65536/131702=满级技能.524288=怒气技(必然)", FCVAR_NONE, true, 0.0, true, 2.0);
841
- g_pCvarInfectedBot = CreateConVar("lv_infected_bot", "0", "为感染者机器人生存随机属性.0=禁用.1=启用.2=启用+满级 ", FCVAR_NONE, true, 0.0, true, 2.0);
843
+ g_pCvarInfectedBot = CreateConVar("lv_infected_bot", "0", "为感染者机器人生存随机属性.0=禁用.1/2/4/8/16=技能.32/64/128/256=装备.262144=怒气技(或许)\n512/1024/2048/4096=满级装备.8192/16384/32768/65536/131702=满级技能.524288=怒气技(必然) ", FCVAR_NONE, true, 0.0, true, 2.0);
842
844
g_CvarSoundLevel = CreateConVar("lv_sound_level", "items/suitchargeok1.wav", "天赋技能选单声音文件途径");
843
845
cv_particle = CreateConVar("lv_portals_particle", "electrical_arc_01_system", "存读点特效", FCVAR_NONE);
844
846
cv_sndPortalERROR = CreateConVar("lv_portals_sounderror","buttons/blip2.wav", "存点声音文件途径", FCVAR_NONE);
@@ -1517,7 +1519,7 @@ public OnMapStart()
1517
1519
1518
1520
GetConVarString(g_CvarSoundLevel, g_soundLevel, sizeof(g_soundLevel));
1519
1521
PrecacheSound(g_soundLevel, true);
1520
- PrecacheSound("ui/gift_drop.wav" , true);
1522
+ PrecacheSound(SOUND_GIFT , true);
1521
1523
1522
1524
for(int i = 0; i < sizeof(g_sndShoveInfected); ++i)
1523
1525
PrecacheSound(g_sndShoveInfected[i], true);
@@ -1560,6 +1562,8 @@ public OnMapStart()
1560
1562
PrecacheSound(SOUND_LEVELUP);
1561
1563
PrecacheSound(SOUND_AMMO);
1562
1564
PrecacheSound(SOUND_CROW);
1565
+ PrecacheSound(SOUND_EXPLOSIVE);
1566
+ PrecacheSound(SOUND_GIFT);
1563
1567
1564
1568
PrecacheModel( STAR_1_MDL );
1565
1569
PrecacheModel( STAR_2_MDL );
@@ -1585,7 +1589,7 @@ public OnMapStart()
1585
1589
{
1586
1590
// Initialization(i);
1587
1591
ClientSaveToFileLoad(i, g_pCvarSaveStats.BoolValue);
1588
- g_bFirstLoaded[i] = true;
1592
+ // g_bFirstLoaded[i] = true;
1589
1593
1590
1594
if(IsValidAliveClient(i))
1591
1595
RegPlayerHook(i, false);
@@ -8219,7 +8223,7 @@ void DropItem( int client, const char[] Model )
8219
8223
AcceptEntityInput(entity, "AddOutput", client, entity);
8220
8224
AcceptEntityInput(entity, "FireUser1", client, entity);
8221
8225
8222
- EmitAmbientSound("ui/gift_drop.wav" , vecPos, entity, SNDLEVEL_CAR);
8226
+ EmitAmbientSound(SOUND_GIFT , vecPos, entity, SNDLEVEL_CAR);
8223
8227
}
8224
8228
}
8225
8229
@@ -9676,6 +9680,7 @@ public void Event_PlayerSpawn(Event event, const char[] eventName, bool dontBroa
9676
9680
bool sur = (StrEqual(eventName, "player_first_spawn", false) && IsPlayerHaveEffect(client, 35));
9677
9681
bool full = (si || sur || (g_Cvarhppack.BoolValue && !g_bIsGamePlaying));
9678
9682
RegPlayerHook(client, full);
9683
+ g_bFirstLoaded[client] = false;
9679
9684
9680
9685
if(g_clSkill_1[client] & SKL_1_Armor)
9681
9686
{
@@ -11287,7 +11292,7 @@ void RegPlayerHook(int client, bool fullHealth = false)
11287
11292
}
11288
11293
else if(g_bFirstLoaded[client])
11289
11294
{
11290
- g_bFirstLoaded[client] = false;
11295
+ // g_bFirstLoaded[client] = false;
11291
11296
int hl = GetEntProp(client, Prop_Data, "m_iHealth");
11292
11297
if(hl > maxHealth)
11293
11298
SetEntProp(client, Prop_Data, "m_iHealth", maxHealth);
@@ -12204,7 +12209,7 @@ public void PlayerHook_OnReloadStopped(int client, int weapon)
12204
12209
g_iReloadWeaponEntity[client] = INVALID_ENT_REFERENCE;
12205
12210
g_iReloadWeaponClip[client] = 0;
12206
12211
g_iReloadWeaponOldClip[client] = 0;
12207
-
12212
+
12208
12213
/*
12209
12214
if(IsValidClient(client))
12210
12215
PrintToChat(client, "停止换子弹");
@@ -12963,7 +12968,8 @@ stock bool IsSurvivorThirdPerson(int iClient)
12963
12968
return true;
12964
12969
if(GetEntPropEnt(iClient, Prop_Send, "m_hScriptUseTarget") > 0)
12965
12970
return true;
12966
- if(GetEntPropFloat(iClient, Prop_Send, "m_staggerTimer", 1) > -1.0)
12971
+ // if(GetEntPropFloat(iClient, Prop_Send, "m_staggerTimer", 1) > -1.0)
12972
+ if(IsStaggering(iClient) || IsGettingUp(iClient))
12967
12973
return true;
12968
12974
switch(GetEntProp(iClient, Prop_Send, "m_iCurrentUseAction"))
12969
12975
{
@@ -13067,9 +13073,10 @@ stock bool IsInfectedThirdPerson(int iClient)
13067
13073
{
13068
13074
if(GetEntPropFloat(iClient, Prop_Send, "m_TimeForceExternalView") > GetGameTime())
13069
13075
return true;
13070
- if(GetEntPropFloat(iClient, Prop_Send, "m_staggerTimer", 1) > -1.0)
13076
+ // if(GetEntPropFloat(iClient, Prop_Send, "m_staggerTimer", 1) > -1.0)
13077
+ if(IsStaggering(iClient) || IsGettingUp(iClient))
13071
13078
return true;
13072
-
13079
+
13073
13080
switch(GetEntProp(iClient, Prop_Send, "m_zombieClass"))
13074
13081
{
13075
13082
case 1://smoker
@@ -16259,7 +16266,7 @@ stock void CreateExplosion(int attacker = -1, float damage, float origin[3], flo
16259
16266
16260
16267
AcceptEntityInput(entity, "Explode", -1, entity);
16261
16268
// EmitSoundToAll("weapons/hegrenade/explode5.wav", entity, SNDCHAN_WEAPON, SNDLEVEL_SCREAMING, SND_NOFLAGS, SNDVOL_NORMAL, 100, _, origin, NULL_VECTOR, false, 0.0);
16262
- EmitAmbientSound("weapons/hegrenade/explode5.wav" , origin, entity, SNDLEVEL_SCREAMING);
16269
+ EmitAmbientSound(SOUND_EXPLOSIVE , origin, entity, SNDLEVEL_SCREAMING);
16263
16270
16264
16271
SetVariantString("OnUser1 !self:Kill::1:1");
16265
16272
AcceptEntityInput(entity, "AddOutput", attacker, entity);
0 commit comments