mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-03 18:51:22 +00:00
* Updated to ZDoom r3504:
- Fixed: FileReader's FilePos is relative to the start of the file, not relative to the start of the lump, so r3496's change to FileReader::Gets() was only valid for lumps at the start of a wad. (This function was still incorrect before that, though, since it made FilePos relative to StartPos after it had been used once.) - Do the P_SightCheck() last in A_JumpIfInTargetLOS, since it's the most expensive check. - Fixed: A_JumpIfInTargetLOS did the FOV cone check from self -> target rather than from target -> self. - Fixed: Reset to the PlayerPawn's default render style and alpha in G_PlayerFinishLevel(). - Fixed: M_CreateMenus() is too soon to call UpdateJoystickMenu(). It needs to happen after I_InitInput(), which happens during V_Init2(). - Apply patch to prevent the flash state from being processed twice after using A_GunFlash. - Fixed: Disable absolute wall lighting when in the shadow of a 3D floor. - Fixed: Trying to -playdemo a demo recorded from -loadgame would crash if you did not -loadgame the corresponding save. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1336 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
5a2966a2e2
commit
b34815e471
13 changed files with 466 additions and 416 deletions
|
@ -145,15 +145,15 @@ long FileReader::Read (void *buffer, long len)
|
|||
|
||||
char *FileReader::Gets(char *strbuf, int len)
|
||||
{
|
||||
if (len <= 0 || FilePos >= Length) return NULL;
|
||||
if (len <= 0 || FilePos >= StartPos + Length) return NULL;
|
||||
char *p = fgets(strbuf, len, File);
|
||||
if (p != NULL)
|
||||
{
|
||||
int old = FilePos;
|
||||
FilePos = ftell(File) - StartPos;
|
||||
if (FilePos > Length)
|
||||
FilePos = ftell(File);
|
||||
if (FilePos - StartPos > Length)
|
||||
{
|
||||
strbuf[Length-old] = 0;
|
||||
strbuf[Length - old + StartPos] = 0;
|
||||
}
|
||||
}
|
||||
return p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue