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.
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.
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'.
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.
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.
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.
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.