summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWillian Henrique <wsimanbrazil@yahoo.com.br>2022-11-29 21:20:18 -0300
committerMichael Smith <mikesmiffy128@gmail.com>2022-12-26 14:24:54 +0000
commitf28cd3c70fc75114413ce0719e298f30cec407fa (patch)
tree8ace8fb998de681052f603043b6954eb14d3bd16
parent9a09c605402e6ff74f93f7fe7afc50ccc785acc3 (diff)
Fix FOV feature crashing Portal 3420 on map load
This was an accidental regression in an earlier refactoring.
-rw-r--r--src/fov.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fov.c b/src/fov.c
index 9ab1137..8319ed1 100644
--- a/src/fov.c
+++ b/src/fov.c
@@ -72,9 +72,9 @@ static void fovcb(struct con_var *v) {
}
// ensure FOV is applied on load, if the engine wouldn't do that itself
-HANDLE_EVENT(ClientActive, struct edict *player) {
- if (player && real_fov_desired == fov_desired) {
- orig_SetDefaultFOV(player, con_getvari(fov_desired));
+HANDLE_EVENT(ClientActive, struct edict *e) {
+ if (real_fov_desired == fov_desired) {
+ orig_SetDefaultFOV(e->ent_unknown, con_getvari(fov_desired));
}
}