Commit graph

339 commits

Author SHA1 Message Date
Yamagi Burmeister
a9cc79dddf Push entities slightly away from non horizontal surfaces.
Otherwise the entities origin might be in the surface, which causes it
to be rendered in full black.
2019-06-15 17:46:57 +02:00
Yamagi Burmeister
d6f8caed07 Link with -lm.
This is not strictly necessary since the main executable should provide
the symbols, but it may increase compatibility with other source ports
and underlinking is never a good idea.
2019-05-13 17:09:49 +02:00
Yamagi Burmeister
e16436efe2 Remove some unnecessary code duplication. 2019-05-09 18:17:06 +02:00
Yamagi
fef3b42212
Merge pull request #16 from afreuden/afreuden-patch-1
Add make game.dylib for Darwin
2019-05-09 18:15:29 +02:00
Yamagi Burmeister
bdcec720f0 Don't allow 'give health 0' or even less.
Giving the player < -1 health and increasing it to something above 0
without closing the console breaks the player state.
2019-04-27 19:21:05 +02:00
Angus Freudenberg
cec4adf2e4
Add make game.dylib for Darwin 2019-04-13 15:57:53 +10:00
Yamagi Burmeister
1d6e3f6eab Fix stupid missmerge, ReadField() may only be called once for a field. 2019-02-05 08:56:06 +01:00
Yamagi Burmeister
39e5a3189d Update the CHANGELOG for 2.06. 2019-02-04 14:39:19 +01:00
Yamagi Burmeister
b830f28827 Save gclient_t::resp.coop_respawn.*weapon to fix coop savegames.
This fixed bug #357 - the problem was that
client->resp.coop_respawn.weapon and .lastweapon (pointers to gitem)
were not properly initialized when loading a savegame.  Now those fields
are saved (=> we had to bump the savegame version) and for old savegames
client->resp.coop_rewspawn is initialized from client->pers, as a hack
for backwards-compatibility.
2019-02-04 12:05:13 +01:00
Yamagi
9394c3adad
Merge pull request #13 from Pickle/master
Added parenesis for REGEX REPLACE command to fix this error:
2018-12-21 15:25:54 +01:00
Scott
4067de64f2 Added parenesis for REGEX REPLACE command to fix this error:
CMake Error at CMakeLists.txt:25 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
2018-12-15 17:05:42 -05:00
Yamagi Burmeister
a0fbb36fbc Import Q_strlcpy() and replace several dangerous strncpy() with it. 2018-10-25 19:15:41 +02:00
Yamagi Burmeister
4626e7a8d9 Switch some annoying and wrang GCC warnings off. 2018-10-25 19:11:30 +02:00
Yamagi Burmeister
50a6255b0a Call strcasecmp() and not Quake IIs home made version.
The home made version is crap and not const correct.
2018-10-25 19:09:01 +02:00
Yamagi Burmeister
315d0ad7ed Add variable declaration missed in last commit. 2018-10-13 09:06:11 +02:00
Yamagi Burmeister
eb0c7a3cb5 Split the gibs per frame limit between gibs and debris.
The gibs and debris per frame must be limited to prevent server mem
map overflows. Until now debris and gibs were handled the same, the
debris spawned by rockets and grenates could prevent the actual gibs
of the killed monster from spawning.

Before this change 20 entities were spawned at max. Now up tp 40
enties can be spawned. This needs some testings.
2018-10-07 12:13:48 +02:00
Yamagi Burmeister
57c80dccf7 Don't accelerate upper entities, let them be pushed by the lower ent.
A long time ago in 2b4f223 I introduced a small logic change to the
handling of stacked entities. If two entities were standing on each
other the original code set the movement speed of the upper entity
to 0. It would be pushed or dragged by the lower entity. I changed
that in way that the upper entity got the same speed as the lower
entity. With that change it wasn't pushed or dragged but moving on
it's own. I hoped to fix some of the 'elevator hurts player or monster'
bugs.

That hope was wrong, at a later time we quirked all elevators that hurt
the player. Additionally the change lead to physics bugs if entities are
standing on high speed elevators (more than 200 units per seconds). So
revert it
2018-10-07 12:05:24 +02:00
Daniel Gibson
cd8d9afdaf 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:48:33 +02:00
Yamagi Burmeister
618953fbdd Replace strcasecmp() by Q_strcasecmp() for better MSVC compaibility.
This was suggest by @ajbonner in issue #11.
2018-03-23 15:54:14 +01:00
Yamagi Burmeister
a9b24bfa04 Fix a potential crash in ai_run_melee() and ai_run_missile().
This was found and fixed by Maraakate.
2017-09-07 18:09:25 +02:00
Yamagi Burmeister
99a032c6ae Enforce static linkage of libgcc on Windows. 2017-06-16 12:49:41 +02:00
Yamagi Burmeister
173892c2dc Update the CHANGELOG for 2.05. 2017-05-25 11:46:23 +02:00
Yamagi Burmeister
12480710e6 Add some maphack that're specific to coop.
These are some corner cases that can only happen when one or both
players die at the wrong place and time. This is based upon a fix by
Maraakate. This fixes issue #9.
2017-03-13 15:06:49 +01:00
Yamagi Burmeister
76a2d97569 The attack function for brains was missing, add it back.
This was likely lost in some merge or cleanup. Reported by maraakate
in issue #8.
2017-03-13 14:32:00 +01:00
Yamagi Burmeister
cc3b204e5a Add a missing sanity check. attacker->classname may be NULL.
This was reported by maraakate in issue #170.
2017-03-13 14:28:06 +01:00
Yamagi Burmeister
2cda032cee Fix a small typo: s/withe/with/1
Reported by @lonkamikaze in IRC
2017-02-11 13:23:57 +01:00
Yamagi Burmeister
80fb945cff Make sure that a monsters enemy is still alive when deciding to attack.
When the monster was already killed by another monster or a coop player
some references may be NULL and the game was crashed. This was observed
by maraakte, who reported it in issue #164. I've just merged his fix
from q2dos.
2016-12-30 10:25:22 +01:00
Yamagi Burmeister
d98e1b9eb0 Add some missing sanity checks.
This was reported by Maraakate in yquake2 issue #164.
2016-12-28 18:04:14 +01:00
Yamagi Burmeister
d3f299cca6 Reorder conditionals to please unoptimizing compilers
This was requested by Maraakate. This is likely a noop, since even
early compilers from th 1970th supported simple optimiziations like
this.
2016-12-20 15:21:24 +01:00
Yamagi Burmeister
3f66dec8c8 Use strtod() instead of strof() to aid VS2005 2016-12-18 10:19:35 +01:00
Yamagi Burmeister
77536e07d8 Change edict_s->show_hostile from qboolean to int and add casts
This variable is used as an integer. Defining it as a qbooblean is
just wrong. Add some explicit float -> int casts while at it.
2016-12-18 09:17:54 +01:00
Yamagi Burmeister
1bea78c4ec Rename teleport_time to last_sound time
teleport_time has nothing to do with teleports, it's just the time
since the last player sound. Rename it accordingly. This was suggest
by maraakate in yquake2 issue #162.
2016-12-18 09:16:28 +01:00
Yamagi Burmeister
20cdbfe1c0 Fix monsters ignoring the player under certain circumstances
In ai_checkattack() is a check against AI_SOUND_TARGET. If the player
made a noice and the the monster noticed this noise it's true. If
that noice was more than 5 seconds ago the monster forgets that event
and continues with it's search for the player. Otherwise it informs
the surrounding monsters that something interesting has happened and
then returns false. So the problem is: Even if the monster heard the
player and can see him, it aborts at this point.

Fix this by adding an additional visibility check. Do the sound
checking only if the player is not visible, otherwise just continue.

This was reported by shoober420 and debbuged by maraakate. This fix
was DanielGibons idea. This commit fixes yquake2 issue #162.
2016-12-18 09:15:21 +01:00
Yamagi Burmeister
60321a282f Make sure that strings are null terminated.
This is a noop, it just adds some safety. This was reported by maraakate
in yquake2 issue #160.
2016-12-17 11:09:09 +01:00
Yamagi Burmeister
8ad1ba53d6 Change from atoi() to strtol() to match baseq2.
This is a noop. This was reported by maraakate in yquake issue #160.
2016-12-17 11:08:00 +01:00
Yamagi Burmeister
5c004e2c22 Take into account that the player origin may not be in his center
This is another corner case that looks more correct in baseq2. This was
reported by maraakate in yquake2 issue #160.
2016-12-17 11:06:40 +01:00
Yamagi Burmeister
fe0f0ad86f In M_CheckGround() use the trace velocity.
I have no clue what this is about. But when in doupt baseq2 is right...
:) This was reported by maraakate in yquake2 issue #160.
2016-12-17 11:05:52 +01:00
Yamagi Burmeister
0e00bb0d9f Only start monsters with max_health == health if max_health isn't set.
I dont' know if any monsters start with max_health != health, but this
looks more correct. This was reported by maraakate in yquake2 issue 160.
2016-12-17 11:04:34 +01:00
Yamagi Burmeister
be91d27005 In ED_ParseField() replace atof() with strtof().
On most implementations atof() is just a wrapper around strtod().
Calling strtof() saves one cast. For the sake of cinsistency change
atoi() to (int)strtol(), it's a noop. Reported by maraakate in
yquake2 issue #160.
2016-12-17 11:02:18 +01:00
Yamagi Burmeister
4285702803 Use Q_strcasecmp instead of Q_stricmp().
This should be be noop but looks safer. Reported by maraakate in yquake2
issue #160.
2016-12-17 10:58:50 +01:00
Yamagi Burmeister
48a06ef31e Add missing sanity checks in ED_ParseEdict() and ED_NewString().
This was reported by maraakate in yquake2 issue #160.
2016-12-17 10:57:32 +01:00
Daniel Gibson
8a9b33612a Make debris SOLID_NOT
in baseq2 this caused bug #154
2016-10-24 17:29:11 +02:00
Daniel Gibson
d1e811bd5b Fix typo in ai_checkattack() leading to monsters running in place
this is the fix from yquake2/#151
2016-10-23 18:28:36 +02:00
Yamagi Burmeister
6034d77bbe Generate game.dylib on OS X. Fixes #148. 2016-08-14 16:23:09 +02:00
Yamagi Burmeister
92be77cd83 Update CHANGELOG 2016-06-25 10:35:59 +02:00
Yamagi Burmeister
7e03dfaac2 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:35:10 +02:00
Yamagi Burmeister
741e98028e Make gibs and debris SOLID_BBOX so they move on entities. 2016-04-29 17:42:02 +02:00
Yamagi Burmeister
291d9852ee 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:30:41 +02:00
Yamagi Burmeister
ef8882e106 Another CHANGELOG update 2015-09-08 17:13:04 +02:00
Yamagi Burmeister
79b3261c29 Update CHANGELOG 2015-09-07 17:18:02 +02:00