Commit graph

122 commits

Author SHA1 Message Date
Yamagi Burmeister
6467137619 Switch from an arch whitelist to an "all archs are supported" approach.
The old whitelist was a leftover from the early days of YQ2. It should
run on most / all architectures, as long SDL supports them. As suggested
by smcv in issue #138 generate the OSTYPE and ARCH defines by the build
system instead of hardcoding it.

Savegame compatibility is provided by bumping the savegame version. Old
savegames are compared against the old OSTYPE and ARCH defined, new ones
against the new defines. This compatibility code should be removed
somewhere in the distant future.
2016-06-11 09:47:05 +02:00
Yamagi Burmeister
7e7ed6bf94 Make gibs and debris SOLID_BBOX so they move on entities. 2016-04-29 17:44:52 +02:00
Yamagi Burmeister
89cb707444 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:19:12 +02:00
Yamagi Burmeister
ac864530cd fix a divinely dumbassed mistake of global 'i' and 'corners' variables
Info_RemoveKey: use memmove instead of strcpy for overlapping memory
areas.

Submitted by: Ozkan Sezer
2015-08-31 18:39:25 +02:00
Yamagi Burmeister
a32778260f SV_Physics_Pusher: fix the 'memory corrupted' check
Submitted by: Ozkan Sezer
2015-08-31 18:36:54 +02:00
Yamagi Burmeister
be3472d045 fix several printf format string errors in games' code
Submitted by: Ozkan Sezer
2015-08-31 18:36:18 +02:00
Yamagi Burmeister
40183c82ae fix misplaced braces in the last else case
Submitted by: Ozkan Sezer
2015-08-31 18:33:50 +02:00
Yamagi Burmeister
a2c0f5cb4f Remove unused prototype of GetGameAPI()
Submitted by: Ozkan Sezer
2015-08-31 18:32:43 +02:00
Daniel Gibson
7929e845d3 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:40:49 +02:00
Daniel Gibson
bcbae17d9c Fix Coop Bug in RHANGAR1 when friendly fire was off
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.
2014-11-30 17:50:34 +01:00
Yamagi Burmeister
6c854253de Remove unnecessary conditionals. They're always true. 2014-08-03 11:40:36 +02:00
Yamagi Burmeister
1859c42484 Use correct return type 2014-08-03 11:34:06 +02:00
Yamagi Burmeister
d8eb7037a4 Use correct flavor of abs() 2014-08-03 11:29:47 +02:00
Yamagi Burmeister
8dd8520ddc 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:44:21 +02:00
Yamagi Burmeister
bac51c8d95 Whitespace cleanup 2014-02-22 13:20:22 +01:00
Yamagi Burmeister
926c38ac1b Fix help computer and inventory updates when already opened
These changes ware originally committed by svdijk into baseq2
as reveison 6f6c9a1 to 20110fa.
2014-02-22 13:14:02 +01:00
Yamagi Burmeister
f4058dc8e9 Remove to unsued variables not found by Clang 2014-02-13 08:10:06 +01:00
Yamagi Burmeister
e53422065e Add functions of Deadalus and Medic Commander
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*
2014-02-11 19:07:27 +01:00
Yamagi Burmeister
069ded5e88 Bring back the Medic Commander, lost during early cleanup 2014-02-11 19:07:07 +01:00
Yamagi Burmeister
2bbb79e56b Bring back the Deadalus, lost during early cleanup 2014-02-11 19:06:23 +01:00
Yamagi Burmeister
5fe56d8bac Fix manual loading of maps in coop mode
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.
2014-02-06 19:23:06 +01:00
Yamagi Burmeister
f69e6aa98a Cleanup window (both stages) and add sanity checks 2014-02-06 18:49:22 +01:00
Yamagi Burmeister
eb4dc2b586 Cleanup turret and add sanity checks 2014-02-06 18:46:12 +01:00
Yamagi Burmeister
342c157e15 Cleanup tank and add sanity checks 2014-02-06 18:45:56 +01:00
Yamagi Burmeister
e77291f8c7 Cleanup supertank and add sanity checks 2014-02-06 18:42:23 +01:00
Yamagi Burmeister
cb95ec45a0 Cleanup stalker and add sanity checks 2014-02-06 18:42:06 +01:00
Yamagi Burmeister
f10b7137ff Cleanup soldier and add sanity checks 2014-02-06 18:41:49 +01:00
Yamagi Burmeister
af65bf67e0 Cleanup parasite and add sanity checks 2014-02-05 19:46:50 +01:00
Yamagi Burmeister
8bf6b098b2 Cleanup mutant and add sanity checks 2014-02-05 19:46:32 +01:00
Yamagi Burmeister
ea8149e344 Cleanup player animations 2014-02-05 19:46:18 +01:00
Yamagi Burmeister
93b666e830 Cleanup move.c and add sanity checks 2014-02-05 19:45:59 +01:00
Yamagi Burmeister
817cb17c10 Cleanup medic and add sanity checks 2014-02-05 19:45:37 +01:00
Yamagi Burmeister
f13744b79e Cleanup insane and add sanity checks 2014-02-05 19:43:50 +01:00
Yamagi Burmeister
b123f6870d Cleanup infantry and add sanity checks 2014-02-05 19:43:26 +01:00
Yamagi Burmeister
cc4c996cd5 Cleanup hover and add sanity checks 2014-02-04 17:32:13 +01:00
Yamagi Burmeister
c9f4d792f9 Cleanup gunner and add sanity checks 2014-02-04 17:31:41 +01:00
Yamagi Burmeister
a3eb6b72aa Cleanup gladiator and add sanity checks 2014-02-04 17:31:19 +01:00
Yamagi Burmeister
08e453217d Cleanup flyer and add sanity checks 2014-02-04 17:29:42 +01:00
Yamagi Burmeister
73899ec20c Cleanup floater and add sanity checks 2014-02-04 17:29:21 +01:00
Yamagi Burmeister
e2edf54062 Cleanup flipper and add sanity checks 2014-02-04 17:29:01 +01:00
Yamagi Burmeister
d3710d28e1 Cleanup chick and add sanity checks 2014-02-03 17:51:47 +01:00
Yamagi Burmeister
9e61cdfc45 Cleanup carrier and add sanity checks 2014-02-03 17:51:27 +01:00
Yamagi Burmeister
21948786d0 Cleanup brain and add sanity checks 2014-02-03 17:50:12 +01:00
Yamagi Burmeister
a12497536f Cleanup boss3 and add sanity checks 2014-02-03 17:49:44 +01:00
Yamagi Burmeister
134d6008c1 Cleanupo boss2 and add sanity checks 2014-02-03 17:48:44 +01:00
Yamagi Burmeister
2c05b79e46 Cleanup berserker and add sanity checks 2014-02-03 17:48:26 +01:00
Yamagi Burmeister
d97357f177 Remove actor
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.
2014-02-02 18:40:34 +01:00
Yamagi Burmeister
83e9c55ab5 Cleanup local.h 2014-02-02 18:17:27 +01:00
Yamagi Burmeister
777e939e8c Cleanup game.h 2014-02-02 18:14:54 +01:00
Yamagi Burmeister
daefddcf6b Add file headers
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.
2014-01-30 18:33:36 +01:00