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.
In 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.
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.
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 '.'.
This brings the necessary changes to the savegame tables for being able
to save levels with an Deadalus or Medic Commander. Since this breaks
savegame compatiblity, bump the savegame version. *sigh*
With this commit the clean up of Ground Zero aka rogue is finished. It
took me 10 month and about 150 hours. Every line of code was audited,
hundered of sanity checks added and of course all known bugs fixed.
Additionally the whole code was reformated. All in all Ground Zero
should now be much more reliable and or the first time in ~16 years
completeable without any crashes, logic bugs or the like.
To say some kind words: Ground Zero was by far the best game module code
that I've seen so far in my whole Quake II work. Especially the new
stuff like the Stalker or the Black Window was in much better shape that
anything else. Good work, whoever wrote it. :)
Of course this code is totaly untested. The next step is testing,
testing and testing.
This change ports my magic "find the right coop spawnpoint if target is
unset"-heuristic from baseq2 to rogue. This code was originally written
by me and is licensed to the GPL and the Quake II SDK license. With this
change all maps can by loaded by console in coop mode without spawnpoint
problems.
The actor was a special "monster" used für simulating NPC. It was never
fully implemented and therefor disfunctional. Thus it was never used in
any map. Remove it like done in baseq2 and xatrix.
With this commit the game logic is cleaned up. Coop spawnpoint cleanup
is still missing, it'll be done at a later time. While not completely
finshed, rogue should alread run much more stable than the unmodified
code. Please note, that this is still untested! Headers are next,
monsters will be done after that.