Commit graph

40 commits

Author SHA1 Message Date
Yamagi Burmeister
4bdd8facd5 Merge outstanding savegame changes from yquake.
- Switch from an whitelist base approach regarding platforms and systems
  to an blacklist approach. This is savegame version 2.
- Fix coop_respan struct not fully initialized after savegame load while
  running in coop mode. This is savegame version 3.

Support for savegame version 2 was added to keep the divergence between
zaero and the other addons low.
2019-02-04 13:24:13 +01:00
Daniel Gibson
4e031fe308 Switch to Enforcers bloody skin when he's killed
When killing the enforcer with one shot (instead of damaging him first
without killing, which will switch to the bloody skin), the skin wasn't
changed. Now it is.
2018-10-03 17:49:07 +02:00
Daniel Gibson
b0f4627044 coop spawnpoint fix from other addons 2016-02-20 20:29:38 +01:00
Daniel Gibson
2bcbd86a61 A few fixes from q2dos 2016-02-20 18:20:20 +01:00
Daniel Gibson
3fabd3c09c remove (unused) q_shared.h
header/shared.h is used instead
2016-02-20 18:19:57 +01:00
Daniel Gibson
469c53e03e Reset gibsthisframe and lastgibframe at map change
ported de5849caf534c5c687bcfcd9f5951e3a62da3fd7 from yquake2 to zaero
2016-02-20 17:46:14 +01:00
Daniel Gibson
0822b94db9 Fixed some crashes during gameplay and loading; broke savegame compat
I added more missing fields to savegame/tables/fields.h and reordered
everything to make missing fields easier to find.
This broke savegame compatibility, and that might happen again.
I hope I'll remember to bump the savegame version before merging this
branch to master.

I also got segfaults (e.g. when a door was blocked by a corpse) in
G_UseTargets() because activator was NULL.

And in g_cmds.c there was a typo in OnSameTeam() - from the relatively
recent fix. No idea why, it doesn't exist in the other addons..
2015-06-29 18:11:12 +02:00
Daniel Gibson
0e4e1b7285 Fix crashes when loading savegame
savegame/tables/fields.h was missing some fields with FFL_NOSPAWN
and FFL_NOSPAWN handling in g_spawn.c was missing

Because of that after loading a savegame some pointers were invalid
and dereferencing them resulted in segfaults.
2015-05-19 04:19:41 +02:00
Daniel Gibson
aa5ccc1770 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:48:21 +02:00
Daniel Gibson
398aeff770 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 18:06:36 +01:00
Yamagi Burmeister
49f92a0c72 Correctly destroy blocking entities and derefernce entities destroyed by
the killbox
2011-10-12 07:50:52 +00:00
Yamagi Burmeister
9d1d32d2be Add savegames tables, missed yesterday 2011-10-12 07:10:17 +00:00
Yamagi Burmeister
8770845581 Fix non-moving soldiers 2011-10-11 15:41:08 +00:00
Yamagi Burmeister
04163afa82 Rearrange files 2011-10-11 15:28:06 +00:00
Yamagi Burmeister
6d456db7d1 Port the new savegame system 2011-10-11 14:28:49 +00:00
Yamagi Burmeister
59bfb6f8c4 Calculate a real bounding box for rotating entities 2011-10-11 14:15:32 +00:00
Yamagi Burmeister
71d6ee0935 Fix the crash when too much debris or gibs is shown 2011-10-11 14:13:17 +00:00
Yamagi Burmeister
b49bec2143 Remove static 2011-10-11 10:12:01 +00:00
Yamagi Burmeister
179cd6b1d0 Fixt einen Crash beim Benutzen der lasergranaten 2009-10-08 15:56:19 +00:00
Yamagi Burmeister
4a9bfc2cf3 Weapon, Trigger, Sentien und Spwan aufgeräumt 2009-10-08 15:37:19 +00:00
Yamagi Burmeister
3492d05a57 Hund, Items, Handler, Kamera und MTest aufgeräumt 2009-10-08 15:14:40 +00:00
Yamagi Burmeister
4b73b52ebb Boss aufgeräumt 2009-10-08 15:00:39 +00:00
Yamagi Burmeister
db9643d393 Animationscode, die Autocannon, die KI und die Handler 2009-10-07 14:45:55 +00:00
Yamagi Burmeister
a68d4e906f Soldir, Supertank und Tank. Damit sind nun alle auch im Hauptspiel
vorhandenen Moster auf dessen Stand
2009-10-07 09:54:15 +00:00
Yamagi Burmeister
60af02fc6d Mutant und Parasite 2009-10-07 09:43:38 +00:00
Yamagi Burmeister
3d80fd35eb Bewegungscode aufgeräumt 2009-10-07 09:40:04 +00:00
Yamagi Burmeister
261c58d154 Infantry, Medic und Insane 2009-10-07 09:36:57 +00:00
Yamagi Burmeister
7b568379ef Hover, Gladiator und Gunner 2009-10-07 09:32:19 +00:00
Yamagi Burmeister
85b52bc522 Float, Flyer und Flipper aufgeräumt 2009-10-07 09:27:38 +00:00
Yamagi Burmeister
e9b6dc2090 Chick, Brain und Flash aufgeräumt 2009-10-07 09:22:45 +00:00
Yamagi Burmeister
f9fc8c6cd8 Bosse aufegräumt 2009-10-07 09:16:58 +00:00
Yamagi Burmeister
ca12654654 Actor und Berserker aufgeräumt 2009-10-07 09:11:27 +00:00
Yamagi Burmeister
1d1062b173 Mutand aufgeräumt 2009-10-07 09:08:50 +00:00
Yamagi Burmeister
5a6e8255b6 Funktionierende Savegames, vielleichet... 2009-10-04 14:59:03 +00:00
Yamagi Burmeister
75ec3fea54 Was mergebar war, ist nun gemerged 2009-04-10 16:02:48 +00:00
Yamagi Burmeister
c8c834c79e 2009-04-10 15:44:49 +00:00
Yamagi Burmeister
3272fedbdb Und weitere Dateien portiert 2009-04-10 15:39:58 +00:00
Yamagi Burmeister
096c3faa1c Einige Dateien aufgeraemunt 2009-04-10 15:13:00 +00:00
Yamagi Burmeister
2590b35e2a Den Savegamecode hoch auf 3.20 portiert. Muss noch mal ordentlich
durchgetestet werden, gerade auf 32Bit und Linux
2009-04-10 14:23:07 +00:00
Yamagi Burmeister
30fb82ecb1 Zaero eingefuegt 2009-04-10 07:37:41 +00:00