Skip to content

Commit

Permalink
Actually check against player center
Browse files Browse the repository at this point in the history
  • Loading branch information
nosoop committed Mar 16, 2021
1 parent 0c57626 commit d834523
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripting/cwx.sp
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,13 @@ static void ComputeEquipSlotPosition() {
}

static bool IsPlayerInRespawnRoom(int client) {
float vecMins[3], vecMaxs[3], vecCenter[3];
float vecMins[3], vecMaxs[3], vecCenter[3], vecOrigin[3];
GetClientMins(client, vecMins);
GetClientMaxs(client, vecMaxs);
GetClientAbsOrigin(client, vecOrigin);

GetCenterFromPoints(vecMins, vecMaxs, vecCenter);
AddVectors(vecOrigin, vecCenter, vecCenter);
return TF2Util_IsPointInRespawnRoom(vecCenter, client, true);
}

Expand Down

0 comments on commit d834523

Please sign in to comment.