Commit graph

113 commits

Author SHA1 Message Date
Yamagi Burmeister
b475a527c9 Change edict_s->show_hostile from qboolean to int and add casts
This variable is used as an integer. Defining it as a qbooblean is
just wrong. Add some explicit float -> int casts while at it.
2016-12-18 09:27:56 +01:00
Yamagi Burmeister
eadb063611 Rename teleport_time to last_sound time
teleport_time has nothing to do with teleports, it's just the time
since the last player sound. Rename it accordingly. This was suggest
by maraakate in yquake2 issue #162.
2016-12-18 09:26:51 +01:00
Yamagi Burmeister
d8d33d4353 Fix monsters ignoring the player under certain circumstances
In ai_checkattack() is a check against AI_SOUND_TARGET. If the player
made a noice and the the monster noticed this noise it's true. If
that noice was more than 5 seconds ago the monster forgets that event
and continues with it's search for the player. Otherwise it informs
the surrounding monsters that something interesting has happened and
then returns false. So the problem is: Even if the monster heard the
player and can see him, it aborts at this point.

Fix this by adding an additional visibility check. Do the sound
checking only if the player is not visible, otherwise just continue.

This was reported by shoober420 and debbuged by maraakate. This fix
was DanielGibons idea. This commit fixes yquake2 issue #162.
2016-12-18 09:25:42 +01:00
Yamagi Burmeister
b71b80d790 Generate game.dylib on OS X. Fixes #148. 2016-08-14 16:31:46 +02:00
Yamagi Burmeister
8439d43508 Update the CHANGELOG 2016-06-25 10:32:41 +02:00
Yamagi Burmeister
adb307b197 Switch from an arch whitelist to an "all archs are supported" approach. 2016-06-11 09:53:38 +02:00
Yamagi Burmeister
8cef59c4c8 Make gibs and debris SOLID_BBOX so they move on entities. 2016-04-29 17:47:19 +02:00
Martin Hauke
a089f4c747 Fix CMake support 2016-03-17 09:02:00 +01:00
Yamagi Burmeister
8a40cd5e9f Reset gibsthisframe and lastgibframe at map change
Without this change the conditionals at g_misc.c:199 and 381 wouldn't
trigger until level.framenum reach it's previous value, resulting in
much to few debris or gibs being thrown. This fixes #104.

Many thanks to maraakate for the analysis and the idea how to fix it.
2015-10-24 13:14:31 +02:00
Yamagi Burmeister
0516300a11 Update CHANGELOG 2015-09-07 17:15:12 +02:00
Yamagi Burmeister
36ed53346e fix a divinely dumbassed mistake of global 'i' and 'corners' variables
Submitted by: Ozkan Sezer
2015-08-31 18:54:02 +02:00
Yamagi Burmeister
70c9889d16 Info_RemoveKey: use memmove instead of strcpy for overlapping memory areas.
Submitted by: Ozkan Sezer
2015-08-31 18:53:18 +02:00
Yamagi Burmeister
445f266843 SV_Physics_Pusher: fix the 'memory corrupted' check
Submitted by: Ozkan Sezer
2015-08-31 18:48:27 +02:00
Yamagi Burmeister
ee24659ba4 fix several printf format string errors in games' code
Submitted by: Ozkan Sezer
2015-08-31 18:46:49 +02:00
Yamagi Burmeister
a65b93192c Removed unused prototype to GetGameApi()
Submitted by: Ozkan Sezer
2015-08-31 18:44:19 +02:00
Yamagi Burmeister
dffca8fc79 Add CMake support 2015-08-23 19:17:53 +02:00
Daniel Gibson
988afce481 Fix bug with high velocities in vents in 32bit builds, fix MingW build
See https://github.com/yquake2/yquake2/issues/71
and https://github.com/yquake2/xatrix/issues/4

In ClientThink(), the float value ent->velocity[i]*8 is saved into
a short and if the value is too big for a short, in 32bit gcc builds
the short is set to SHRT_MIN, resulting in the player being pressed
down instead of up.
Now we put the result in a 32bit int first (which should be big enough)
and assign the int to the short. This still overflows, but with -fwrapv
at least in a defined way (most probably the same way the original
binaries did).

The Makefile now sets $CC to gcc for MingW builds, this should fix
https://github.com/yquake2/xatrix/issues/3

And while I was at it, when the game lib is loaded, it prints the date
it was built, this is especially interesting for our Win32 binaries.
2015-05-17 18:45:26 +02:00
Daniel Gibson
e2b397d92c One entity shooting another should work even if friendly fire is off
In rogue's RHANGAR1 the turret didn't blow up the ceiling when friendly fire
was off, because in ClientTeam() both entities were set to "" (no team),
but OnSameTeam() just did a strcmp() instead of checking this special
case (no team).
We check this now and thus it works. Hooray.
I also refactored ClientTeam() to take the buffer instead of using a
static one and to be static (it's only called by OnSameTeam() anyway).
2014-11-30 18:02:32 +01:00
Yamagi Burmeister
ca84136e65 Use the correct flavors of abs() 2014-08-03 11:16:08 +02:00
Yamagi Burmeister
017bc7276f Rewrite COM_FileExtention()
COM_FileExtension() was parsing strings from beginning to end, bailing
out as soon as '.' was found and treating everything thereafter as the
file extension. That behavior caused problem with relatives pathes like
models/monsters/tank/../ctank/skin.pcx. The new implementation uses
strrchr() to determine the last '.'.
2014-07-30 21:39:58 +02:00
Yamagi Burmeister
5caf9c980f Remove the now unneeded mkdir.exe 2014-02-14 13:19:13 +01:00
Yamagi Burmeister
6286419315 Port the Makefile to our new Windows build environment 2014-02-14 11:47:30 +01:00
Yamagi Burmeister
22efcc09a5 Mention 1.02 changes 2012-12-30 18:01:18 +01:00
Yamagi Burmeister
6837d9ded0 Add OS X installation guide 2012-11-05 21:31:43 +01:00
Yamagi Burmeister
498f682480 Add support for OS X to the Makefile 2012-10-06 09:49:04 +02:00
Yamagi Burmeister
2dba62f553 Add CHANGELOG 2012-09-03 14:32:21 +02:00
Yamagi Burmeister
ae1fe9b8e0 Update the README 2012-07-01 10:10:57 +02:00
Yamagi Burmeister
7588bf17db Modernize the Makefile and add support for Windows 2012-07-01 10:05:20 +02:00
Yamagi Burmeister
d83a257bef Fix compiler warnings (no operational changes) 2012-07-01 09:44:33 +02:00
Yamagi Burmeister
46090d9665 This is the "ctf" repo, converted from subversion to git. 2012-04-29 13:38:11 +02:00
Yamagi Burmeister
45190b270d Reformat waepon.c, view.c und trail.c 2011-10-15 10:50:11 +00:00
Yamagi Burmeister
78cddcd152 Reformat hud.c 2011-10-15 10:15:33 +00:00
Yamagi Burmeister
a225b0fb17 Cleanup client.c 2011-10-15 10:08:45 +00:00
Yamagi Burmeister
ad679e33b2 Reformat move.c and player.h 2011-10-15 09:14:06 +00:00
Yamagi Burmeister
55c85f474e Reformat menu.c 2011-10-15 09:05:55 +00:00
Yamagi Burmeister
3ebbe127d2 Reformat headers. 2011-10-15 09:00:10 +00:00
Yamagi Burmeister
9357548ed3 Reformat g_weapon.c 2011-10-15 08:31:34 +00:00
Yamagi Burmeister
b15f5fc407 Cleanup g_utils.c 2011-10-15 08:22:51 +00:00
Yamagi Burmeister
725c5a94b7 Reformat g_trigger.c 2011-10-15 08:15:25 +00:00
Yamagi Burmeister
373e2d1efc g_target cleanup 2011-10-15 08:04:00 +00:00
Yamagi Burmeister
a9ff185e0d Reformat g_svcmds.c 2011-10-15 07:52:57 +00:00
Yamagi Burmeister
dcc29861ae Reformat g_spawn.c 2011-10-15 07:48:24 +00:00
Yamagi Burmeister
f13b82939e Reformat g_save.c 2011-10-14 13:04:38 +00:00
Yamagi Burmeister
0f1fbc8290 Reformat g_phys.c 2011-10-14 12:26:26 +00:00
Yamagi Burmeister
777f3a47f7 Reformat g_monster.c 2011-10-14 12:16:01 +00:00
Yamagi Burmeister
616576868c lean g_misc.c 2011-10-14 12:05:55 +00:00
Yamagi Burmeister
6ce1448459 reformat g_items.c 2011-10-14 11:54:10 +00:00
Yamagi Burmeister
542604630b Reformat g_main.c 2011-10-14 07:17:08 +00:00
Yamagi Burmeister
46ee52025b Reformat g_func.c 2011-10-14 07:09:26 +00:00
Yamagi Burmeister
b4e4eb749c reformat g_ctf.c 2011-10-13 06:56:52 +00:00