Commit graph

2668 commits

Author SHA1 Message Date
Yamagi
9cc466b2c2 Fix stupid oversight: Query the correct variable for the quicksave name. 2019-10-25 18:09:08 +02:00
Yamagi
123228961d
Merge pull request #478 from BjossiAlfreds/docs
Added some text to cycleweap doc and added name to credits
2019-10-17 10:44:24 +02:00
BjossiAlfreds
c7b412e768 Added some text to cycleweap doc and added name to credits 2019-10-12 23:51:56 +00:00
Yamagi Burmeister
bf1d8a6cb6 Hack the quicksave slot into the menu.
With this quicksaves can be loaded from the menu. They cannot be saved.
That's an artificial limitation to match the behavior of autosaves. I
think both should behave the same because their comment string are
formatted the same...

This is somewhat hacky. Until now the menu assumed that all savegames
are named from save0 to saveX, where save0 is the autosave slot. There
were 16 slots per page * 2 pages = 32 savegame slot, so the highest slot
was save31. I've reduced the slot per page to 14 to make room for one
quicksave slot and one empty line between it and the first regular slot.
That alone would reduce the number of slots to 28, making the four
highest slots unreachable. So I've increased the number of pages to 4,
there're now 14 slots per page * 4 pages = 56 slots.

The quicksave slot is shown on every page, because it was the easiest
way to integrate it into the existing code. Everything else would
require the paging logic to be rewritten in a way that different pages
can have a different number of slots and a different layout.

This is part of #473.
2019-10-12 16:56:14 +02:00
Yamagi
b24a75ec32 Document how map rotations are configured.
This closes #457.
2019-10-12 16:45:55 +02:00
Yamagi
d4a914644c Document the commands added by YQ2. 2019-10-12 16:39:42 +02:00
Yamagi
e3c3875bda Explain how option strings with quotation marks are given at cmd-line.
This is part of #457.
2019-10-12 16:25:19 +02:00
Yamagi
08a905b6b2 Update the document index to match our new filenames. 2019-10-12 16:24:56 +02:00
Yamagi
e77a8efa77 Reorder documentation files and make room for future additions. 2019-10-12 16:17:18 +02:00
Yamagi
4e1ed93ae0
Merge pull request #475 from 0lvin/for_review
Copy drawn lines if picture scaled
2019-10-03 10:16:13 +02:00
Yamagi
5fff2f3a25
Merge pull request #474 from BjossiAlfreds/grenquad
Quad sound for quadded hand grenades
2019-10-03 10:11:55 +02:00
Denis Pauk
de2457bb2a Copy drawn lines if picture scalled 2019-10-02 22:07:57 +03:00
BjossiAlfreds
8be755caa2 Quad sound for quadded hand grenades 2019-10-01 21:07:46 +00:00
Yamagi Burmeister
70a94f759f Fix demo playback if cl_loadpaused is 1.
Demos are special. To the client they're more or less the same as normal
maps, the only difference is that the client never joines the server. So
we're never getting the first valid frame txpaht indicates the end of
the connection process. We're using that one to drop out of pause
mode... As a result the client stays in pause mode forever and "hangs".

Work around this by entering pause mode only if the local server is in
state ss_game. Demos are ss_demo. There're some more states for
cinematics, pictures, etc. Since the player can't save in those states
it should be save not check them.
2019-10-01 22:26:37 +02:00
Yamagi Burmeister
52b5698014 Make the new 'cycleweap' command autocompleteable. 2019-10-01 20:55:27 +02:00
Yamagi
e053710dbc
Merge pull request #472 from BjossiAlfreds/cycleweap
Added cycleweap command for generalized xatrix-like weapon switching
2019-10-01 20:53:45 +02:00
BjossiAlfreds
3074c2ddf8 Added cycleweap command for generalized xatrix-like weapon switching 2019-09-29 11:57:09 +00:00
Yamagi
56908ddfa9
Merge pull request #469 from BjossiAlfreds/floatfix
Added missing '== RANGE_MELEE'
2019-09-28 16:17:32 +02:00
BjossiAlfreds
8b62c972ac Added missing '== RANGE_MELEE' 2019-09-28 03:13:51 +00:00
Yamagi
a0d2604030
Merge pull request #468 from BjossiAlfreds/dodge
Fix monsters being disoriented after ducking
2019-09-27 11:08:50 +02:00
Yamagi
cadca8d5ec
Merge pull request #467 from BjossiAlfreds/makron
Fixed medics unable to heal makrons
2019-09-27 11:05:10 +02:00
BjossiAlfreds
cfedd92b4f Fix monsters being disoriented after ducking 2019-09-27 00:16:21 +00:00
BjossiAlfreds
981801f6b3 Merge branch 'master' into makron 2019-09-26 13:56:27 +00:00
Yamagi
357fbdb6b8
Merge pull request #461 from BjossiAlfreds/checkattack
Fix monsters not changing state after enemy goes away
2019-09-26 14:31:09 +02:00
BjossiAlfreds
6e86473cd5 Fixed medics unable to heal makrons 2019-09-26 11:48:38 +00:00
Daniel Gibson
378f01f7b5 SV_FatPVS(): use int32_t instead of long, as the code assumes it's 32bit 2019-09-25 21:39:02 -01:00
BjossiAlfreds
0bea4d9f44 Fix monsters not changing state after enemy goes away 2019-09-25 20:01:56 +00:00
Yamagi Burmeister
0286cdcd0b Fix floater melee / zap damage getting applied if enemy is out of range.
Found by @BjossiAlfreds, closes #454.
2019-09-23 17:32:43 +02:00
Yamagi
a942ca4bba
Merge pull request #459 from BjossiAlfreds/pathcorner
Triggered spawned monsters use path_corner correctly
2019-09-23 14:08:16 +02:00
Daniel Gibson
4e68ea13b2 Fix loading .cfg's without trailing newline
.. by adding a newline character to the end of the loaded file.
fixes #453
2019-09-22 19:11:07 +02:00
Daniel Gibson
77493e6e5b Don't call SDL_GetWindowDisplayIndex() with window == NULL
I got an SDL assertion because of this.
The problem was that PrintDisplayModes() was called at startup before a
window was created.
2019-09-22 19:09:10 +02:00
BjossiAlfreds
03c96b3fa3 Triggered spawned monsters use path_corner correctly 2019-09-21 08:15:42 +00:00
Yamagi
9bb0425e36
Merge pull request #455 from BjossiAlfreds/crusified-marine-pain
Fix for insane marines not always playing pain sounds
2019-09-16 12:35:58 +02:00
BjossiAlfreds
80c9976899 Fix for insane marines not always playing pain sounds 2019-09-15 13:16:21 +00:00
Yamagi
990e4f6989
Merge pull request #450 from bibendovsky/fix/448_pendingplays
Fix the pending sound list sorting
2019-09-15 09:41:01 +02:00
Yamagi
cf742c0228
Merge pull request #452 from BjossiAlfreds/monster-viewheight-bugfix
Full bugfix for monsters not fighting parasites
2019-09-14 10:20:16 +02:00
Yamagi
9132d36df7
Merge pull request #449 from 0lvin/for_review
Make static C code analysis tool little more happy(#426)
2019-09-14 10:15:12 +02:00
BjossiAlfreds
223ab4d7b2 Full bugfix for monsters not fighting parasites 2019-09-14 01:33:47 +00:00
Boris I. Bendovsky
16ee0073d4
Fix the pending sound list sorting 2019-09-13 19:48:44 +03:00
Denis Pauk
129da805a1 Make static C code analysis tool little more happy(#426)
sw_image.c:
	203: The potential null pointer is passed into 'memcpy' function. Inspect the first argument. Check lines: 203, 192.
	368: The null pointer is passed into 'free' function. Inspect the first argument.
	401: Expression '!pic' is always false.
	401: There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 394, 401.
	565: The potential null pointer is passed into 'memcpy' function. Inspect the first argument. Check lines: 565, 564.

sw_model.c:
	215: The 'model' pointer was used unsafely after it was verified against nullptr. Check lines: 210, 215.
	985: The 'header->lumps[12].filelen / sizeof (int)' expression was implicitly cast from 'size_t' type to 'float' type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A = (double)(X) / Y;.
	1277: Function 'RE_BeginRegistration' argument 1 names different: declaration 'map' definition 'model'.

sw_surf.c:
	239: There might be dereferencing of a potential null pointer 'sc_base'. Check lines: 239, 236.

sw_main.c:
	1345: The if condition is the same as the previous if condition
	1466: Function 'R_GammaCorrectAndSetPalette' argument 1 names different: declaration 'pal' definition 'palette'
	2063: The 'swap_buffers' pointer in the expression could be nullptr. In such case, resulting value of arithmetic operations on this pointer will be senseless and it should not be used. Check lines: 2063, 2061.

sw_aclip.c:
	180: Variable 'j' is reassigned a value before the old one has been used.

sw_alias.c:
	209: Function 'R_AliasTransformVector' argument 3 names different: declaration 'm' definition 'xf'.

sw_draw.c:
	78: Function 'RE_Draw_CharScaled' argument 3 names different: declaration 'c' definition 'num'.
	149: Function 'RE_Draw_GetPicSize' argument 3 names different: declaration 'name' definition 'pic'.
	173: The scope of the variable 'u' can be reduced.
	267: Function 'RE_Draw_PicScaled' argument 4 names different: declaration 'factor' definition 'scale'.

sw_scan.c
	593: Function 'D_DrawSpansPow2' argument 1 names different: declaration 'pspans' definition 'pspan'.
	745: Function 'D_DrawZSpans' argument 1 names different: declaration 'pspans' definition 'pspan'.
2019-09-12 22:36:13 +03:00
Yamagi
5d97bbff8a
Merge pull request #442 from 0lvin/for_review
Add zBuffer damage logic
2019-09-12 10:05:32 +02:00
Yamagi Burmeister
7d28dbbc54 Add telepport and listentities commands as forward to server cmds.
This makes them available for autocompletion. Closes issue #430.
2019-09-12 09:35:38 +02:00
Denis Pauk
0bace327f8 Add zbuffer damage checks
Save current player position and compare with a position in the previous
frame, if position is same refresh only changed rectangle in zbuffer.
zBuffer can be damaged by models, particles and static transparent spans.

zBuffer damage is not useful for the screen refresh minimize for now,
as result of explosion can change texture light value.
2019-09-10 08:20:48 +03:00
Denis Pauk
aba398c1b9 dump current possition in world 2019-09-10 08:20:48 +03:00
Denis Pauk
7435283213 Skip flush screen after palette change
Fixes issue with black screen on new game after show the introduction video
2019-09-10 08:20:48 +03:00
Yamagi Burmeister
90c2ac8946 Make sure that the entity to be printed 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 #430.
2019-09-07 14:27:21 +02:00
Yamagi Burmeister
c41f61f8fb 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 arounf suggested by @BjossiAlfreds. Fixes #443.
2019-09-06 07:46:59 +02:00
Yamagi Burmeister
281aaeebbd 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 #441.
2019-09-06 07:04:53 +02:00
Yamagi Burmeister
34c27cd2c7 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 #440.
2019-09-06 06:52:55 +02:00
Yamagi Burmeister
cd93737eb7 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 #430.
2019-09-05 17:48:07 +02:00