Skip to content

Commit

Permalink
Merge pull request #484 from KZGlobalTeam/dev
Browse files Browse the repository at this point in the history
3.6.2
  • Loading branch information
zealain authored Jul 15, 2024
2 parents 46f0401 + aafe33d commit 4ce210a
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 20 deletions.
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/gokz-core/misc.sp
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,9 @@ static int FindUseEntity(int client)
float m_vecMins[3];
float m_vecMaxs[3];
float m_vecOrigin[3];
GetEntPropVector(ent, Prop_Send, "m_vecOrigin", m_vecOrigin);
GetEntPropVector(ent, Prop_Send, "m_vecMins", m_vecMins);
GetEntPropVector(ent, Prop_Send, "m_vecMaxs", m_vecMaxs);
GetEntPropVector(client, Prop_Send, "m_vecOrigin", m_vecOrigin);
GetEntPropVector(client, Prop_Send, "m_vecMins", m_vecMins);
GetEntPropVector(client, Prop_Send, "m_vecMaxs", m_vecMaxs);

delta[2] = IntervalDistance(endpos[2], m_vecOrigin[2] + m_vecMins[2], m_vecOrigin[2] + m_vecMaxs[2]);
if (GetVectorLength(delta) < 80.0)
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/gokz-global.sp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public void OnMapEnd()
public void GOKZ_OnOptionChanged(int client, const char[] option, any newValue)
{
if (StrEqual(option, gC_CoreOptionNames[Option_Mode])
&& GlobalAPI_IsInit())
&& GlobalAPI_IsInit() && IsClientAuthorized(client))
{
UpdatePoints(client);
}
Expand Down
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/gokz-jumpstats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
return Plugin_Continue;
}

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])
public Action Movement_OnPlayerMovePost(int client)
{
OnPlayerRunCmdPost_JumpTracking(client);
Movement_OnPlayerMovePost_JumpTracking(client);
return Plugin_Continue;
}

public void Movement_OnStartTouchGround(int client)
Expand Down
8 changes: 2 additions & 6 deletions addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,19 +1425,15 @@ public Action Movement_OnWalkMovePost(int client)
return Plugin_Continue;
}

public Action Movement_OnPlayerMovePost(int client)
{
lastMovementProcessedTime[client] = jumpTrackers[client].tickCount;
return Plugin_Continue;
}

public void OnPlayerRunCmdPost_JumpTracking(int client)
public void Movement_OnPlayerMovePost_JumpTracking(int client)
{
if (!IsValidClient(client) || !IsPlayerAlive(client))
{
return;
}

lastMovementProcessedTime[client] = jumpTrackers[client].tickCount;
// Check for always failstats
if (doFailstatAlways[client])
{
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/gokz-mode-kztimer.sp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Plugin myinfo =

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

#define MODE_VERSION 217
#define MODE_VERSION 2170
#define DUCK_SPEED_NORMAL 8.0
#define PRE_VELMOD_MAX 1.104 // Calculated 276/250
#define PERF_SPEED_CAP 380.0
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/gokz-mode-simplekz.sp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Plugin myinfo =

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

#define MODE_VERSION 21
#define MODE_VERSION 210
#define PS_MAX_REWARD_TURN_RATE 0.703125 // Degrees per tick (90 degrees per second)
#define PS_MAX_TURN_RATE_DECREMENT 0.015625 // Degrees per tick (2 degrees per second)
#define PS_SPEED_MAX 26.54321 // Units
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/gokz-mode-vanilla.sp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Plugin myinfo =

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

#define MODE_VERSION 17
#define MODE_VERSION 170

float gF_ModeCVarValues[MODECVAR_COUNT] =
{
Expand Down
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/gokz-replays/controls.sp
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ int MenuHandler_ReplayControls(Menu menu, MenuAction action, int param1, int par
{
if (!IsValidClient(param1))
{
return;
return 0;
}

int bot = GetBotFromClient(GetObserverTarget(param1));
if (bot == -1 || controllingPlayer[bot] != param1)
{
return;
return 0;
}

char info[16];
Expand Down Expand Up @@ -207,6 +207,7 @@ int MenuHandler_ReplayControls(Menu menu, MenuAction action, int param1, int par
delete menu;
}
}
return 0;
}

void CancelReplayControls(int client)
Expand Down
9 changes: 8 additions & 1 deletion addons/sourcemod/scripting/gokz-replays/playback.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ void PlaybackVersion2(int client, int bot, int &buttons, float vel[3], float ang
{
newButtons |= IN_JUMP;
}
if (currentTickData.flags & RP_IN_DUCK || currentTickData.flags & RP_FL_DUCKING)
if (currentTickData.flags & RP_IN_DUCK)
{
newButtons |= IN_DUCK;
}
Expand Down Expand Up @@ -1206,6 +1206,13 @@ void PlaybackVersion2Post(int client, int bot)
{
SetEntityFlags(client, entityFlags | FL_INWATER);
}
if (currentTickData.flags & RP_FL_DUCKING)
{
SetEntPropFloat(client, Prop_Send, "m_flDuckAmount", 1.0);
SetEntProp(client, Prop_Send, "m_bDucking", false);
SetEntProp(client, Prop_Send, "m_bDucked", true);
SetEntityFlags(client, FL_DUCKING);
}

botSpeed[bot] = GetVectorHorizontalLength(currentTickData.velocity);
playbackTick[bot]++;
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/gokz-tpanglefix.sp
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ void PatchAngleFix()
{
if (LoadFromAddress(gA_ViewAnglePatchAddress, NumberType_Int8) == 0)
{
StoreToAddress(gA_ViewAnglePatchAddress, 1, NumberType_Int8);
StoreToAddress(gA_ViewAnglePatchAddress, 1, NumberType_Int8, false);
}
}

void RestoreAngleFix()
{
if (LoadFromAddress(gA_ViewAnglePatchAddress, NumberType_Int8) == 1)
{
StoreToAddress(gA_ViewAnglePatchAddress, 0, NumberType_Int8);
StoreToAddress(gA_ViewAnglePatchAddress, 0, NumberType_Int8, false);
}
}

Expand Down

0 comments on commit 4ce210a

Please sign in to comment.