Commit graph

98 commits

Author SHA1 Message Date
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
Yamagi Burmeister
943e91e300 Reformat g_combat.c 2011-10-13 06:37:06 +00:00
Yamagi Burmeister
9abb572aff Reformat g_cmds.c 2011-10-13 06:30:38 +00:00
Yamagi Burmeister
f1ae66d1de reformat g_chase.c 2011-10-13 06:26:54 +00:00
Yamagi Burmeister
502e7c6f80 Reformat g_ai.c 2011-10-13 06:25:39 +00:00
Yamagi Burmeister
bf1cc4a816 Nuke blocking items the right way and make sure that the killbox works 2011-10-12 07:39:20 +00:00
Yamagi Burmeister
61b90ae89a Add license headers back 2011-10-11 10:56:40 +00:00
Yamagi Burmeister
28c68488f0 Calculate a real bounding box fpr rotating entities 2011-10-11 07:36:52 +00:00
Yamagi Burmeister
30e1a7c140 Fix the crash resulting in too much debris or gib. 2011-10-11 07:31:44 +00:00
Yamagi Burmeister
6ebc0cf18a Add README 2011-10-11 07:29:14 +00:00
Yamagi Burmeister
26137d15c0 Rearrange files 2011-10-11 06:57:12 +00:00
Yamagi Burmeister
b851b787f9 - Add missing files
- Add Makefile
2011-10-11 06:33:45 +00:00
Yamagi Burmeister
f60af12409 Add LICENSE files 2011-10-10 19:40:18 +00:00
Yamagi Burmeister
87478789d6 Move ctf/ into it's own subproject. 2011-10-09 16:11:15 +00:00