Commit graph

276 commits

Author SHA1 Message Date
Yamagi
374ab0bc43
Merge pull request #35 from BjossiAlfreds/dodge
Fix monsters being disoriented after ducking
2019-09-27 11:08:18 +02:00
Yamagi
db930af20f
Merge pull request #34 from BjossiAlfreds/makron
Fixed medics unable to heal makrons
2019-09-27 11:04:35 +02:00
BjossiAlfreds
8e1b97202e Fix monsters being disoriented after ducking 2019-09-27 00:28:58 +00:00
BjossiAlfreds
9e4eb9670e Merge branch 'master' into makron 2019-09-26 13:58:35 +00:00
Yamagi
4a0dcfface
Merge pull request #33 from BjossiAlfreds/checkattack
Fixed monsters not changing state after enemy goes away
2019-09-26 14:15:51 +02:00
BjossiAlfreds
06660b9332 Fixed medics unable to heal makrons 2019-09-26 12:06:43 +00:00
BjossiAlfreds
c755470e37 Fixed monsters not changing state after enemy goes away 2019-09-25 20:09:13 +00:00
Yamagi Burmeister
edb8bf2534 Fix floater melee / zap damage getting applied if enemy is out of range.
Found by @BjossiAlfreds, closes yquake2/yquake2#454.
2019-09-23 17:32:06 +02:00
Yamagi
202513abb8
Merge pull request #30 from BjossiAlfreds/gekk
Gekk AI fixes
2019-09-23 17:16:08 +02:00
Yamagi
a88bae5e78
Merge pull request #31 from BjossiAlfreds/pathcorner
Fixed triggered spawn monsters not using path_corner markers
2019-09-23 14:08:03 +02:00
Yamagi
c2ba853d51
Merge pull request #27 from BjossiAlfreds/fixbot-heal
Fixbot telefrag check fixed
2019-09-23 13:52:54 +02:00
Yamagi
9b41bb0f92
Merge pull request #25 from BjossiAlfreds/checkvelocity
maxvelocity correctly enforced
2019-09-23 13:30:28 +02:00
BjossiAlfreds
579e43a11b Fixed triggered spawn monsters not using path_corner markers 2019-09-21 19:24:45 +00:00
BjossiAlfreds
8d3ead930e Fixed gekks stopping reacting to pain after jumping 2019-09-21 12:21:17 +00:00
BjossiAlfreds
a2961fa1c0 Fixed gekk getting stuck walking 2019-09-21 12:04:52 +00:00
BjossiAlfreds
7a93826406 Fixbot telefrag check fixed 2019-09-21 00:09:06 +00:00
BjossiAlfreds
6520b2d65f maxvelocity correctly enforced 2019-09-19 23:21:34 +00:00
Yamagi
e69a347852
Merge pull request #22 from BjossiAlfreds/insane-marines-pain
Xatrix fix for insane marines pain sounds
2019-09-16 12:33:13 +02:00
Yamagi
0e0b576f8b
Merge pull request #24 from BjossiAlfreds/fixbot-fixes
Fixed fixbot bot_goal leak
2019-09-16 12:32:28 +02:00
BjossiAlfreds
b018177247 Fixed fixbot bot_goal leak 2019-09-15 15:28:36 +00:00
BjossiAlfreds
e2f7f037aa Xatrix fix for insane marines pain sounds 2019-09-15 13:34:53 +00:00
BjossiAlfreds
3eabed0f71 Beta-class iron maiden fixes 2019-09-15 08:34:04 +00:00
Yamagi
debf08a512
Merge pull request #19 from BjossiAlfreds/makefile-gitignore-fix
Makefile fix for Windows and gitignore now ignores the release folder
2019-09-15 09:05:19 +02:00
Yamagi
3b0c971383
Merge pull request #18 from BjossiAlfreds/monster-viewheight-bugfix
Xatrix bugfix for monsters not fighting back against parasites
2019-09-15 09:04:00 +02:00
BjossiAlfreds
73c9584af2 Makefile fix for Windows and gitignore now ignores the release folder 2019-09-14 10:50:56 +00:00
BjossiAlfreds
e216dda6cc Xatrix bugfix for monsters not fighting back against parasites 2019-09-14 08:45:49 +00:00
Yamagi Burmeister
cfb3e7abf0 Make sure that the entity to printes is valid.
Especially after savegame load not all slots in the edicts array may be
used. Check if the current entity has a classname string. This is
another part of yquake2/yquake2#430.
2019-09-07 14:22:56 +02:00
Yamagi Burmeister
6dfe39ba23 Fix long standing bug of dead parasites falling through the world model.
It's unclear were this comes from, maybe it's a bug in the collision
detection. Because the collision detection is ununderstandable for
people without 'special brain type game programming' like me and even
bugfixes to it have a very high chance to break things, work around
it. Save current position, perform move, check if we're in the world
model. If we are revert to old position.

Debugged and work around suggested by @BjossiAlfreds. Fixes
yquake2/yquake2#443.
2019-09-06 07:52:36 +02:00
Yamagi Burmeister
08a6bfd4df Fix current health being reset to 100 if >100 at level change.
This is another code inconsistency, we must not clamp the current health
to the client max health (which apparently is always 100) but to the
current max health of the player entity.

Analyzed and fix suggest by @BjossiAlfreds, fixes yquake2/yquake2#441.
2019-09-06 07:13:29 +02:00
Yamagi Burmeister
244e0cfa01 Fix monsters not fighting back when attacked by a a parasite.
This is another corner case. Parasites have a bbox height of 24,
walkmonster_start_go() hardcodes a viewheight of 25. Therefor most
traces in other functions like visible() overshoot the parasite.
Fix this by not overriding the monster viewheight.

Analyzed and fix suggested by @BjossiAlfreds. Closes issue
yquake2/yquake2#440.
2019-09-06 06:54:47 +02:00
Yamagi Burmeister
f64f112aa0 Add 'listentities' command.
This rather sophisticated command prints all entities of one or more
given classes and their coordinates. Possible classes are:

* ammo
* items
* keys
* monsters
* weapons

Classes can be combined into one command, e.g. `listentities ammo keys'
would print all ammunition and all keys. The special class `all` prints
all entities, regardless of their class.

The command is protected by `cheats 1`.

This is part of issue yquake2/yquake2#430.
2019-09-05 17:47:10 +02:00
Yamagi Burmeister
532ae678de Add a new command 'teleport'.
A command that teleports the player to abitrary locations was often
requested and may be helpfull for debugging, so finally add it. It works
like a normal teleporter: It moves the player to the requested location,
clears all movements, tells the server and clients that the entity just
teleported and telefrags everything that's in the target location.

The implementation does not verify if the requested location is save,
the player may teleport into the world model or even the void. But the
requested Z coordinate is elevated by 10 units to prevent the player
getting stuck in the floor.

The command is protected by sv_cheats.

This is part of issue yquake2/yquake2#430.
2019-09-05 16:48:23 +02:00
Yamagi Burmeister
bc5f569880 Try to fix monsters getting stuck by waiting forever for their enemy.
44472722e added some sanity checks to the AI code. The checks in
ai_run() are likely wrong because the enemy entity might be already
NULL if we arrive their. By aborting early the code is unable to
determine a new enemy or return the monster to idle state, so the
monster will wait forever for an enemy that'll never come.

This happens only in monster vs. monster fights. Never in monster vs.
player, that game ends if the player dies.

In theory this change should be harmless, because if the enemy entity is
gone it won't generate sound targets now be visible. If the game crashes
by self->enemy being NULL we've got a problem elsewere.

This was reported by @BjossiAlfreds in #483. He also suggested the fix.
2019-08-31 11:17:38 +02:00
Yamagi Burmeister
a562cb8e40 Fix monsters being unable to see the player if he generates noise.
When searching for the player FinTarget() always goes after sound
targets and aborts as soon as it finds one. So if the player is
constantly generating sounds - for example firing the machine gun -
there's a high chance that monsters will only hear but never see
him. Work around this by adding a small timeout to player noises, make
sure that at least 3 frames passed since the last noise. This gives
monsters 2 frames to see the player.

This bug was present in the original code, this is a small gameplay
change.

The problem was analysed by @BjossiAlfreds in #436. He also suggested
the fix.
2019-08-31 11:16:46 +02:00
Yamagi Burmeister
f83ea253c8 Fix berserker fidget animation aborting attack.
M_MoveFrame() calls first the AI functions that decide if a monster
should attack or not. After that the monsters think function is called
which walks through berserk_frames_stand[]. Even if the AI function found
an enemy and decided to attack, the monster is still standing for this
frame and berserker_fidget() is called. It may override the earlier
earlier decision, aborting the attack. Even worse this may let the
berserker stuck, because AI_STAND_GROUND may be cleared which prevents
further attacks.

This bug was present in the original code, so this is small gameplay
change. It's likely also present in both addons.

Reported and analyzed by @BjossiAlfreds in issue #433. He also suggested
the fix.
2019-08-31 11:15:41 +02:00
Yamagi Burmeister
31d46e672d Revert second part of aed38232d3.
Don't know if this has any noticeable impact, but it looks like the
commit was wrong... Revert this in an own commit and look here if there
problems with the gekk.
2019-08-07 07:46:23 +02:00
Yamagi Burmeister
8a1ea1725a Revert heat_think() part of aed38232d3.
@DanielGibson missinterpreted the code, the negation must be applied to
target->svflags only. Otherwise the codition is always true and the
homing rocket never aquires a target.
2019-08-07 07:44:37 +02:00
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