Commit graph

232 commits

Author SHA1 Message Date
Daniel Gibson
4b02b97332 Fix bug with high velocities in vents in 32bit builds, fix MingW build
See https://github.com/yquake2/yquake2/issues/71 and Xatrix #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 #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:42:56 +02:00
Daniel Gibson
150c521e13 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).

The savegame table entry for this function was invalid, but it doesn't
need to be saved anyway, so I just deleted it from the table.
2014-11-30 17:55:38 +01:00
Yamagi Burmeister
dd3bf3ee29 Use the correct flavor of abs() 2014-08-03 11:43:14 +02:00
Yamagi Burmeister
dd50746c4c 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:46:55 +02:00
Yamagi Burmeister
2e95fab925 Remove the now unneeded mkdir.exe 2014-02-14 10:35:46 +01:00
Yamagi Burmeister
a549b5ef6d Port makefile to our new Windows build environment 2014-02-14 10:22:47 +01:00
Yamagi Burmeister
d5d771d373 Fix a progress stopper in xware.bsp 2013-06-15 16:18:31 +02:00
svdijk
fc5760bf99 help/score updates: fix typo 2013-05-04 14:51:09 +02:00
Yamagi Burmeister
c2d0cd97e5 Fix a typo 2013-05-01 09:43:50 +02:00
Yamagi Burmeister
fc85c85047 Update the CHANGELOG 2013-05-01 09:43:39 +02:00
Yamagi Burmeister
f7da445083 Fix help computer and inventory updates when already opened
These changes ware originally committed by svdijk into baseq2
as reveison 6f6c9a1 to 20110fa.
2013-04-29 18:42:17 +02:00
Yamagi Burmeister
3bd64f2da0 Remove superflous statement
This was originaly committed into baseq2 by svdijk
2013-04-29 18:20:11 +02:00
Yamagi Burmeister
a7e3e4b445 Fix a typo in a function prototype in game.h
This is a merge of 909e694 from baseq2, original
written by svdijk.
2013-04-29 18:09:09 +02:00
Yamagi Burmeister
a8ba7b0bb1 Add a FAQ section to README 2013-03-24 11:31:38 +01:00
Yamagi Burmeister
e5d7803869 Update CHANGELOG for 2.0 2013-03-24 11:31:17 +01:00
Yamagi Burmeister
abc4904857 Quirk around xship spawnpoint problems in coop
In xship the coop spawnpoints are farther away from the
info_player_start than in other maps. Work around this by
adding a quirk to the quirk.
2013-03-24 11:18:42 +01:00
Yamagi Burmeister
3f1380caac Fix direct loading of xware in coop
A superfluous unnamed info_player_start screwed up the info_coop_start
selection heuristic. It's unneeded in coop play, therefor remove it.
2013-03-24 09:37:40 +01:00
Yamagi Burmeister
2346274d8f Add TODO to explain the remaining problems 2013-03-10 12:41:40 +01:00
Yamagi Burmeister
5ca8d29816 Fix manuell loading of most maps in coop mode
This changes ports my magic "find the right coop spawnpoint if target is
unset"-heuristic from baseq2 to Xatrix. This code was originally written
by me and is hereby licensed (additionally to the GPL) to the Quake II
SDK license.
2013-03-10 11:58:29 +01:00
Yamagi Burmeister
05931b1520 Add back frames lost somewhere on the run 2013-02-18 18:25:53 +01:00
Yamagi Burmeister
00f0bb8df1 Remove superfluous whitespaces and end of lines
With this commit 'xatrix' is cleaned up. Every single line was audited,
many bugs removed and hundered of sanity checks added. Additionally the
code was reformated. All in all 'Xatrix' should now be much more
reliable and for the first time in ~15 years completeable without any
crashes, logic bugs or the like. Until now about 130 hours spread over
more than a year were spend for this project.

Of course this code is totaly untested. The next step is testing,
testing and testing. After that the spawn points needs to be fixed
so that all maps can pe started by "map $mapname".
2013-02-12 18:49:17 +01:00
Yamagi Burmeister
1fb978cfeb Cleanup tank and add sanity checks 2013-02-12 18:35:56 +01:00
Yamagi Burmeister
46e0ce8dbf Cleanup supertank and add sanity checks 2013-02-12 18:18:36 +01:00
Yamagi Burmeister
9d754f2f0f Cleanup soldier and add sanity checks 2013-02-11 19:04:21 +01:00
Yamagi Burmeister
2e058a591f Cleanup parasite and add sanity checks 2013-02-11 18:31:57 +01:00
Yamagi Burmeister
f7681706f1 Cleanup mutant and add sanity checks 2013-02-11 18:23:48 +01:00
Yamagi Burmeister
98c08b133d Cleanup player.h 2013-02-10 19:16:10 +01:00
Yamagi Burmeister
4c82759f3e Cleanup medic and add sanity checks 2013-02-10 19:16:10 +01:00
Yamagi Burmeister
9050175fbb Cleanup move.c and add sanity checks 2013-02-10 19:15:58 +01:00
Yamagi Burmeister
18b1ea93c9 Cleanup insane and add sanity checks 2013-02-10 18:38:49 +01:00
Yamagi Burmeister
a9b1370e93 Cleanup infantry and add sanity checks 2013-02-10 18:18:52 +01:00
Yamagi Burmeister
bc94f1afb3 Cleanup hover and add sanity checks 2013-02-10 18:06:37 +01:00
Yamagi Burmeister
56d613e7b6 Cleanup gunner and add sanity checks 2013-02-10 17:56:14 +01:00
Yamagi Burmeister
5ca949d991 Cleanup gladiator and add sanity checks 2013-02-03 12:36:01 +01:00
Yamagi Burmeister
fd7d60680e Cleanup gekk and add sanity checks 2013-02-03 09:49:13 +01:00
Yamagi Burmeister
e118c43e34 Cleanup flyer and add santiy checks 2013-02-03 09:22:28 +01:00
Yamagi Burmeister
0d857f224c Cleanup float and add sanity checks 2013-02-02 17:54:53 +01:00
Yamagi Burmeister
9c3e5862cd Clean up flipper and add sanity checks 2013-02-02 17:39:59 +01:00
Yamagi Burmeister
7a52e4a8ae Cleanup fixbot and add sanity checks 2013-02-02 11:05:32 +01:00
Yamagi Burmeister
d2451f5858 Cleanup chick and add sanity checks 2013-02-02 10:44:04 +01:00
Yamagi Burmeister
cc73698b20 Cleanup brain and add sanity checks 2013-02-02 10:29:29 +01:00
Yamagi Burmeister
6222a4174d iCleanup boss5 and add sanity checks 2013-02-02 10:14:13 +01:00
Yamagi Burmeister
4d30309345 Cleanup boss3 and add sanity checks 2013-02-02 10:00:32 +01:00
Yamagi Burmeister
d36bc419d2 Clean up boss2 and add sanity checks 2013-02-02 09:22:07 +01:00
Yamagi Burmeister
3bb1966788 Cleanup the berserker and add sanity checks 2013-01-15 18:45:25 +01:00
Yamagi Burmeister
53a0fc1f5d Remove monster/actor
The "actor" entity are player models moving on scripted pathes,
emulating NPC. They were never finished and thus are used in the
game. In theory the functions shouldn't be referenced anywhere
and thaerefor this change shouldn't break existing savegames.
But I'll habe to check if that stands in praxis.
2013-01-13 10:33:11 +01:00
Yamagi Burmeister
b7c935b2a7 Clean up local.h 2013-01-13 10:25:01 +01:00
Yamagi Burmeister
1a9b6acd81 Cleanup game.h 2013-01-13 10:04:31 +01:00
Yamagi Burmeister
9a29fee404 Add back the coop spawnpoint functions
Those are necessary to preserve savegame compatiblity and
maybe we'll need then anyway...
2013-01-06 15:53:37 +01:00
Yamagi Burmeister
2fd39786b9 Cleanup weapon.c and add sanity checks 2013-01-06 15:53:37 +01:00