Commit Graph

431 Commits

Author SHA1 Message Date
BjossiAlfreds 2eaf15ccf0 Merge remote-tracking branch 'upstream/master' into spawnflags 2019-09-23 16:42:09 +00:00
BjossiAlfreds 9642eec016 coop_baseq2 added and fully functional 2019-09-23 16:41:29 +00:00
Yamagi Burmeister 59cc08fd96 Fix floater melee / zap damage getting applied if enemy is out of range.
Found by @BjossiAlfreds, closes yquake2/yquake2#454.
2019-09-23 17:30:57 +02:00
Yamagi f3dd878809
Merge pull request #30 from BjossiAlfreds/pathcorner
Fixed triggered spawn monsters not using path_corner markers
2019-09-23 14:07:47 +02:00
Yamagi 3bf86f4d61
Merge pull request #28 from BjossiAlfreds/etf-dmflags
Etf dmflags
2019-09-23 13:09:29 +02:00
Yamagi 6258958105
Merge pull request #26 from BjossiAlfreds/checkvelocity
maxvelocity correctly enforced
2019-09-23 13:08:31 +02:00
BjossiAlfreds 29d0b6cbd5 Fixed triggered spawn monsters not using path_corner markers 2019-09-21 19:48:03 +00:00
BjossiAlfreds fbbe82d543 Quick code style fix 2019-09-19 23:52:06 +00:00
BjossiAlfreds 66da1722ca ETF Rifle respects infinite ammo DM flag 2019-09-19 23:36:29 +00:00
BjossiAlfreds 8cb29103e2 maxvelocity correctly enforced 2019-09-19 23:17:42 +00:00
Yamagi bd6fc9df5f
Merge pull request #25 from BjossiAlfreds/insane-marines-pain
Fix for insane marines pain sounds
2019-09-16 12:34:23 +02:00
BjossiAlfreds c79de3adfa Fix for insane marines pain sounds 2019-09-15 13:52:26 +00:00
Yamagi Burmeister d289d0f302 Fix medic commander playing the wrong sound when retracting it's hook.
There's a sound commander_sound_hook_retract, it even get's precached,
but it wasn't refrerenced. Analysed and fix suggested by @BjossiAlfreds.
Closes #21.
2019-09-15 09:29:48 +02:00
Yamagi 120e4684d1
Merge pull request #24 from BjossiAlfreds/usetargets-crash-fix
Killtarget teamchain cleanup crash fix
2019-09-15 09:28:04 +02:00
Yamagi f8ac90d2a8
Merge pull request #23 from BjossiAlfreds/makefile-gitignore-fix
Fix for Makefile on Windows and gitignore now ignores the release folder
2019-09-15 09:16:13 +02:00
Yamagi 2dbcc66efc
Merge pull request #22 from BjossiAlfreds/monster-viewheight-bugfix
Rogue bugfix for monsters not fighting back against parasites
2019-09-15 09:14:56 +02:00
BjossiAlfreds fa063e9710 Killtarget teamchain cleanup crash fix 2019-09-14 11:59:06 +00:00
BjossiAlfreds 21a52d294a Fix for Makefile on Windows and gitignore now ignores the release folder 2019-09-14 11:03:05 +00:00
BjossiAlfreds baf90e941c Rogue bugfix for monsters not fighting back against parasites 2019-09-14 08:12:33 +00:00
Yamagi Burmeister 325910d2fe 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:26:42 +02:00
Yamagi Burmeister e4daf3c070 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:17:14 +02:00
Yamagi Burmeister 119b9369e8 Fix monsters not fighting back when attacked by parasite or fixbot.
This is another corner case. Parasites and fixbots 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:58:35 +02:00
Yamagi Burmeister 57df678fb6 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:45:31 +02:00
Yamagi Burmeister d376d0e5ec 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:51:53 +02:00
Yamagi Burmeister 501ed1e71a 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:11:04 +02:00
Yamagi Burmeister 003a1282ad 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:10:04 +02:00
Yamagi Burmeister 8be3688b1a 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:08:44 +02:00
Yamagi Burmeister ffb5bb57f8 Push entitie 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:45:50 +02:00
Yamagi Burmeister 9989340968 Add back the disruptor / desintegrator.
Make the disruptor and it's ammo available by 'give disruptor' and 'give
rounds'. If g_disruptor is set 0 (the defaults) neither the weapon, nor
the ammo is spawned in, if set to 1 it behaves like a normal weapon.
Based upon an idea by @NeonKnightOA submitted in PR #18.

This was requested in issue #17.
2019-06-11 14:07:48 +02:00
Yamagi Burmeister 90420227db 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:05:54 +02:00
Daniel Gibson 000da6a653 Parasite doesn't leech through walls anymore
The problem was that its head was too close to/in the wall, so the trace
towards the player (to decide if he's reachable) started *in* the wall,
so the wall itself wasn't hit/detected.
Now the trace start is 8 units behind the head and it seems to work.

Fixes #9
2019-05-11 19:44:59 +02:00
Yamagi Burmeister cf6bf166ff Fix missing sanity check, self->enemy can be null.
Suggested by @maraakate, closes #7.
2019-05-09 18:33:23 +02:00
Yamagi Burmeister 96bec2bf1f Remove some unnecessary code duplications. 2019-05-09 18:26:46 +02:00
Yamagi 702110da7d
Merge pull request #15 from afreuden/master
Add make game.dylib for Darwin
2019-05-09 18:24:40 +02:00
Yamagi a689a020f5
Merge pull request #13 from Pickle/master
Added parenesis for REGEX REPLACE command to fix this error:
2019-05-09 18:23:45 +02:00
Yamagi Burmeister 47520a0020 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:19:03 +02:00
Angus Freudenberg c18ba3bd91
Add make game.dylib for Darwin 2019-04-13 16:12:53 +10:00
Yamagi Burmeister eaaf6c43d4 Fix a missmerge, save_ver is supported since version 4 and not 3. 2019-02-05 09:05:18 +01:00
Yamagi Burmeister dc16877ae2 Update the CHANGELOG for 2.05. 2019-02-04 14:44:41 +01:00
Yamagi Burmeister 063776d504 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 10:50:23 +01:00
Yamagi Burmeister 1f82ad2154 Fix parasite, return true instead of false when checking attacks.
This was one of those stupid brainos where you know it better and still
do it wrong... In standard C the return value of a non-void function is
undefined if the closing } is reached. MSVC++5 and 6 returned 1 for
functions with return type int. Since qboolean == int parasite_blocked()
and parasite_checkattack() should return true and not false.

BUT: The true in parasite_blocked() was correct, in the original MSVC++6
build parasites always thought that they're blocked and tried to free
themself.

In parasite_checkattack() the false was wrong, so change it to true. And
yes, the function is crap. The better part of it doesn't make sense and
just burns CPU cycles for nothing. But it's working now and everyone is
happy, so let's leave it alone.

This fixes yquake2 issue #359.
2019-01-30 18:32:17 +01:00
Scott e8d3d5e41c 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:01:39 -05:00
Yamagi Burmeister 433a1423d9 Import Q_strlcpy() and replace several dangerous strncpy() with it. 2018-10-25 19:26:17 +02:00
Yamagi Burmeister 949e9aa008 Switch some annoying and wrong GCC warnings off. 2018-10-25 19:23:49 +02:00
Yamagi Burmeister fbf3841eaa Call strcasecmp() and not Quake IIs home made version.
The home made version is crap and not const correct.
2018-10-25 19:22:27 +02:00
Yamagi Burmeister ffdd699ff4 Add variable declaration missed in the last commit. 2018-10-13 09:08:31 +02:00
Yamagi Burmeister ed4e94510d 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:03:23 +02:00
Yamagi Burmeister c620cea34b 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 11:58:46 +02:00
Daniel Gibson 82d8b31d02 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:45:47 +02:00
Daniel Gibson 525b7dc35a
README: Always put quotes around "Ground Zero"
for consistency.
2018-08-14 21:09:26 +02:00