AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   [TFC] Bug Fixes v1.4 (https://forums.alliedmods.net/showthread.php?t=333746)

se7en 08-01-2021 19:47

[TFC] Bug Fixes v1.4
 
1 Attachment(s)
An updated TFC Bug Fix plugin originally written by hlstriker: https://forums.alliedmods.net/showthread.php?t=297514

PHP Code:

*     Changelog:
*        - 
v1.4    -    2023/06/10
*         + Reworked fix 15Plugin is now fully self contained with no additional plugins/modules needed.
*         + 
Minor code optimizations.
*
*        - 
v1.3    -    2022/05/16
*         + Fixed a bug causing a random player class to be stuck on the same class. Thanks HLM
*
*        - 
v1.2    -    2021/08/02
*         + NOTEThe okapi module is no longer required (could potentially be causing crashes).
*         + 
NOTESince the Double Fire bug has finally been fixed by Steamthis plugin is compatible with the latest build of TFCServers should update.
*         + 
Added a fix for the Death/Zero Health Bug (fix #16).
*         + Added a fix for normal grenade jumps while the server runs at 1000 FPS (fix #17).
*         + Added a fix to allow flag tossing through obstructions (fix #18).
*         + Added a fix to remove AMXX Menus stuck on a screen from last map (fix #19). 

PHP Code:

/*
*     Fixes:
*         - #1: Nails that would have been stuck as "ghosts" are now removed.
*         - #2: Flags will no longer get stuck in solid objects.
*         - #3: Spys can now be infected while feigned. This also prevents the server from crashing due to the infecting/healing feigned spies bug.
*         - #4: Spys can no longer quick disguise. This also prevents the server from crashing due to disguising too quickly.
*         - #5: The camera entity will no longer break the players view if the player disconnects while using it.
*         - #6: Players will no longer stay concussed when they respawn.
*         - #7: Opening doors will no longer remove effects from caltrops.
*         - #8: The engineer's teleport will no longer take the player to the exit location if the player dies before the teleport has finished.
*         - #9: Players can no longer take flags through engineer's teleporters.
*         - #10: Players can no longer uncover dead enemy spies.
*         - #11: Grenades that are stuck inside of another entity will no longer do too much damage to any entities in its explosion radius.
*         - #12: Nail grenades will no longer get stuck in ceilings.
*         - #13: Mirv grenade's bomblets will no longer spawn in areas with a solid object between the mirv and bomblet.
*         - #14: Grenades that prime immediately before death will no longer follow the player to their spawn if they respawn quick enough.
*         - #15: Primed grenades will no longer be wrongly removed by item_tfgoal removal if the player has zero primary or secondary grenades left.
*         - #16: Players view angle will no longer change when a players health is 0 but still alive. (AKA Death Bug or Zero Health Bug)
*        - #17: Normal grenade jumps will always push a player forwards, even while the server runs at 1000 FPS. (sys_ticrate 1000.0)
*        - #18: Flags can now be tossed even if a player/wall is obstructing. (instead of: Not enough room to drop items here)
*        - #19: AMXX Menus stuck on a players screen from the last map are removed.
*
*     Special thanks:
*         - teh ORiON:    Contributed towards fixing bug #8.
*         - azul:            Contributed towards fixing bug #14.
*         - azul:            Supplied the signatures and code for bug #15.

*     Changelog:
*        - v1.4    -    2023/06/10
*         + Reworked fix 15, Plugin is now fully self contained with no additional plugins/modules needed.
*         + Minor code optimizations.
*
*        - v1.3    -    2022/05/16
*         + Fixed a bug causing a random player class to be stuck on the same class. Thanks HLM
*
*        - v1.2    -    2021/08/02
*         + NOTE: The okapi module is no longer required (could potentially be causing crashes).
*         + NOTE: Since the Double Fire bug has finally been fixed by Steam, this plugin is compatible with the latest build of TFC. Servers should update.
*         + Added a fix for the Death/Zero Health Bug (fix #16).
*         + Added a fix for normal grenade jumps while the server runs at 1000 FPS (fix #17).
*         + Added a fix to allow flag tossing through obstructions (fix #18).
*         + Added a fix to remove AMXX Menus stuck on a screen from last map (fix #19).
*
*         - v1.1    -    2017/06/15
*          + NOTE: The okapi module is no longer required.
*          + Added a fix for grenades following players to spawn (fix #14).
*          + Added a fix for primed grenades being wrongly removed by item_tfgoal removal (fix #15).
*          + Fixed an issue with the nail bug fix (fix #1).

*         - v1.0    -    2017/05/15
*          + Initial release (fixes #1-13).
*/ 


RoboCop 08-02-2021 09:42

Re: [TFC] Bug Fixes v1.2
 
Yay!

Suicide_Kid 03-14-2022 23:01

Re: [TFC] Bug Fixes v1.2
 
Loaded this up on our server (OST) recently and found that it messes with the "random" class.

Suicide_Kid 03-16-2022 16:55

Re: [TFC] Bug Fixes v1.2
 
Bees confirmed that it is also happening on the boisy server running a Windows server.

HLM 05-15-2022 10:46

Re: [TFC] Bug Fixes v1.2
 
Quote:

Originally Posted by Suicide_Kid (Post 2774214)
Loaded this up on our server (OST) recently and found that it messes with the "random" class.

I looked through the code, and the only thing I could find that could potentially cause this is the call to change the tfstate flag.
PHP Code:

set_pdata_int(iClient350OFFSET_CLIENT_LINUX_DIFF); // tfstate 

https://github.com/ValveSoftware/hal.../tf_defs.h#L99

I am unsure what flags are being looked for, but I am assuming you would need to do some bitwise checks to see if the flags are present and *ONLY* remove those flags instead of resetting tfstate to 0

Suicide_Kid 05-16-2022 12:20

Re: [TFC] Bug Fixes v1.3
 
Nice!!! I had Azul look at it a while back and he did an edit that's close your updated but has another line. The codeblock from Azul is -->

Code:

public Event_ResetHUD_Alive(iClient)
{
        if(!g_bDied[iClient])
                return;
       
        static iTFState;
        iTFState = get_pdata_int(iClient, 35, OFFSET_CLIENT_LINUX_DIFF);
        set_pdata_int(iClient, 29, 1, OFFSET_CLIENT_LINUX_DIFF); // bRemoveGrenade
        set_pdata_int(iClient, 35, iTFState & ~0x0001, OFFSET_CLIENT_LINUX_DIFF); // tfstate
        engfunc(EngFunc_SetView, iClient, iClient);
        g_bDied[iClient] = false;
        g_bRespawned[iClient] = true;
        g_bBlockConcuss[iClient] = true;
        g_bBlockSetOrigin[iClient] = false;
}


12Toastie 05-23-2022 02:38

Re: [TFC] Bug Fixes v1.3
 
* - #15: Primed grenades will no longer be wrongly removed by item_tfgoal removal if the player has zero primary or secondary grenades left.

This one is happening again

Infamanious 06-12-2022 00:46

Re: [TFC] Bug Fixes v1.3
 
What about spys and instant-death-backstabs when your back is nowhere near the spy? Just a thought...

12Toastie 07-05-2022 05:08

Re: [TFC] Bug Fixes v1.3
 
but on the spy's screen your back IS there.. its a netcode thing completely....

se7en 06-09-2023 20:34

Re: [TFC] Bug Fixes v1.3
 
Quote:

Originally Posted by 12Toastie (Post 2779980)
* - #15: Primed grenades will no longer be wrongly removed by item_tfgoal removal if the player has zero primary or secondary grenades left.

This one is happening again

Should be fixed now :)


All times are GMT -4. The time now is 19:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.