summaryrefslogtreecommitdiffhomepage
path: root/src/l4dwarp.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2023-06-10 16:44:19 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2023-06-10 16:51:02 +0100
commit1c4318331663b152b0b298bd2c9e5c971506a86b (patch)
treea402681cb84b491819ba5018525c16340110fd4d /src/l4dwarp.c
parent602a18977d500ad068fd63fbedcafb630c29ee72 (diff)
Prune some comments and tidy up other minor things
Diffstat (limited to 'src/l4dwarp.c')
-rw-r--r--src/l4dwarp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/l4dwarp.c b/src/l4dwarp.c
index 75c762c..24c3873 100644
--- a/src/l4dwarp.c
+++ b/src/l4dwarp.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2022 Michael Smith <mikesmiffy128@gmail.com>
+ * Copyright © 2023 Michael Smith <mikesmiffy128@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -45,9 +45,7 @@ DEF_CCMD_HERE_UNREG(sst_l4d_testwarp, "Simulate a bot warping to you",
void *e = GetBaseEntity(ed->ent_unknown); // is this call required?
struct vec3f *org = mem_offset(e, off_entpos);
struct vec3f *ang = mem_offset(e, off_eyeang);
- // L4D idle warps go up to 10 units behind relative to whatever angle the
- // player is facing, lessening the distance based on pitch angle but never
- // displacing vertically
+ // L4D idle warps go up to 10 units behind yaw, lessening based on pitch.
float pitch = ang->x * M_PI / 180, yaw = ang->y * M_PI / 180;
float shift = -10 * cos(pitch);
Teleport(e, &(struct vec3f){org->x + shift * cos(yaw),