Skip to content

Commit 4ce210a

Browse files
authored
Merge pull request #484 from KZGlobalTeam/dev
3.6.2
2 parents 46f0401 + aafe33d commit 4ce210a

File tree

10 files changed

+25
-20
lines changed

10 files changed

+25
-20
lines changed

addons/sourcemod/scripting/gokz-core/misc.sp

+3-3
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,9 @@ static int FindUseEntity(int client)
677677
float m_vecMins[3];
678678
float m_vecMaxs[3];
679679
float m_vecOrigin[3];
680-
GetEntPropVector(ent, Prop_Send, "m_vecOrigin", m_vecOrigin);
681-
GetEntPropVector(ent, Prop_Send, "m_vecMins", m_vecMins);
682-
GetEntPropVector(ent, Prop_Send, "m_vecMaxs", m_vecMaxs);
680+
GetEntPropVector(client, Prop_Send, "m_vecOrigin", m_vecOrigin);
681+
GetEntPropVector(client, Prop_Send, "m_vecMins", m_vecMins);
682+
GetEntPropVector(client, Prop_Send, "m_vecMaxs", m_vecMaxs);
683683

684684
delta[2] = IntervalDistance(endpos[2], m_vecOrigin[2] + m_vecMins[2], m_vecOrigin[2] + m_vecMaxs[2]);
685685
if (GetVectorLength(delta) < 80.0)

addons/sourcemod/scripting/gokz-global.sp

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public void OnMapEnd()
374374
public void GOKZ_OnOptionChanged(int client, const char[] option, any newValue)
375375
{
376376
if (StrEqual(option, gC_CoreOptionNames[Option_Mode])
377-
&& GlobalAPI_IsInit())
377+
&& GlobalAPI_IsInit() && IsClientAuthorized(client))
378378
{
379379
UpdatePoints(client);
380380
}

addons/sourcemod/scripting/gokz-jumpstats.sp

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
112112
return Plugin_Continue;
113113
}
114114

115-
public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float vel[3], const float angles[3], int weapon, int subtype, int cmdnum, int tickcount, int seed, const int mouse[2])
115+
public Action Movement_OnPlayerMovePost(int client)
116116
{
117-
OnPlayerRunCmdPost_JumpTracking(client);
117+
Movement_OnPlayerMovePost_JumpTracking(client);
118+
return Plugin_Continue;
118119
}
119120

120121
public void Movement_OnStartTouchGround(int client)

addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp

+2-6
Original file line numberDiff line numberDiff line change
@@ -1425,19 +1425,15 @@ public Action Movement_OnWalkMovePost(int client)
14251425
return Plugin_Continue;
14261426
}
14271427

1428-
public Action Movement_OnPlayerMovePost(int client)
1429-
{
1430-
lastMovementProcessedTime[client] = jumpTrackers[client].tickCount;
1431-
return Plugin_Continue;
1432-
}
14331428

1434-
public void OnPlayerRunCmdPost_JumpTracking(int client)
1429+
public void Movement_OnPlayerMovePost_JumpTracking(int client)
14351430
{
14361431
if (!IsValidClient(client) || !IsPlayerAlive(client))
14371432
{
14381433
return;
14391434
}
14401435

1436+
lastMovementProcessedTime[client] = jumpTrackers[client].tickCount;
14411437
// Check for always failstats
14421438
if (doFailstatAlways[client])
14431439
{

addons/sourcemod/scripting/gokz-mode-kztimer.sp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public Plugin myinfo =
2929

3030
#define UPDATER_URL GOKZ_UPDATER_BASE_URL..."gokz-mode-kztimer.txt"
3131

32-
#define MODE_VERSION 217
32+
#define MODE_VERSION 2170
3333
#define DUCK_SPEED_NORMAL 8.0
3434
#define PRE_VELMOD_MAX 1.104 // Calculated 276/250
3535
#define PERF_SPEED_CAP 380.0

addons/sourcemod/scripting/gokz-mode-simplekz.sp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public Plugin myinfo =
2929

3030
#define UPDATER_URL GOKZ_UPDATER_BASE_URL..."gokz-mode-simplekz.txt"
3131

32-
#define MODE_VERSION 21
32+
#define MODE_VERSION 210
3333
#define PS_MAX_REWARD_TURN_RATE 0.703125 // Degrees per tick (90 degrees per second)
3434
#define PS_MAX_TURN_RATE_DECREMENT 0.015625 // Degrees per tick (2 degrees per second)
3535
#define PS_SPEED_MAX 26.54321 // Units

addons/sourcemod/scripting/gokz-mode-vanilla.sp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public Plugin myinfo =
2929

3030
#define UPDATER_URL GOKZ_UPDATER_BASE_URL..."gokz-mode-vanilla.txt"
3131

32-
#define MODE_VERSION 17
32+
#define MODE_VERSION 170
3333

3434
float gF_ModeCVarValues[MODECVAR_COUNT] =
3535
{

addons/sourcemod/scripting/gokz-replays/controls.sp

+3-2
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ int MenuHandler_ReplayControls(Menu menu, MenuAction action, int param1, int par
165165
{
166166
if (!IsValidClient(param1))
167167
{
168-
return;
168+
return 0;
169169
}
170170

171171
int bot = GetBotFromClient(GetObserverTarget(param1));
172172
if (bot == -1 || controllingPlayer[bot] != param1)
173173
{
174-
return;
174+
return 0;
175175
}
176176

177177
char info[16];
@@ -207,6 +207,7 @@ int MenuHandler_ReplayControls(Menu menu, MenuAction action, int param1, int par
207207
delete menu;
208208
}
209209
}
210+
return 0;
210211
}
211212

212213
void CancelReplayControls(int client)

addons/sourcemod/scripting/gokz-replays/playback.sp

+8-1
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ void PlaybackVersion2(int client, int bot, int &buttons, float vel[3], float ang
10051005
{
10061006
newButtons |= IN_JUMP;
10071007
}
1008-
if (currentTickData.flags & RP_IN_DUCK || currentTickData.flags & RP_FL_DUCKING)
1008+
if (currentTickData.flags & RP_IN_DUCK)
10091009
{
10101010
newButtons |= IN_DUCK;
10111011
}
@@ -1206,6 +1206,13 @@ void PlaybackVersion2Post(int client, int bot)
12061206
{
12071207
SetEntityFlags(client, entityFlags | FL_INWATER);
12081208
}
1209+
if (currentTickData.flags & RP_FL_DUCKING)
1210+
{
1211+
SetEntPropFloat(client, Prop_Send, "m_flDuckAmount", 1.0);
1212+
SetEntProp(client, Prop_Send, "m_bDucking", false);
1213+
SetEntProp(client, Prop_Send, "m_bDucked", true);
1214+
SetEntityFlags(client, FL_DUCKING);
1215+
}
12091216

12101217
botSpeed[bot] = GetVectorHorizontalLength(currentTickData.velocity);
12111218
playbackTick[bot]++;

addons/sourcemod/scripting/gokz-tpanglefix.sp

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ void PatchAngleFix()
131131
{
132132
if (LoadFromAddress(gA_ViewAnglePatchAddress, NumberType_Int8) == 0)
133133
{
134-
StoreToAddress(gA_ViewAnglePatchAddress, 1, NumberType_Int8);
134+
StoreToAddress(gA_ViewAnglePatchAddress, 1, NumberType_Int8, false);
135135
}
136136
}
137137

138138
void RestoreAngleFix()
139139
{
140140
if (LoadFromAddress(gA_ViewAnglePatchAddress, NumberType_Int8) == 1)
141141
{
142-
StoreToAddress(gA_ViewAnglePatchAddress, 0, NumberType_Int8);
142+
StoreToAddress(gA_ViewAnglePatchAddress, 0, NumberType_Int8, false);
143143
}
144144
}
145145

0 commit comments

Comments
 (0)