Raised This Month: $32 Target: $400
 8% 

[TFC] Bug Fixes v1.4


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Team Fortress Classic        Category:   General Purpose       
se7en
Junior Member
Join Date: Feb 2014
Old 08-01-2021 , 19:47   [TFC] Bug Fixes v1.4
Reply With Quote #1

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).
*/ 
Attached Files
File Type: sma Get Plugin or Get Source (BugFixesTFC.sma - 106 views - 17.3 KB)

Last edited by se7en; 06-11-2023 at 09:25.
se7en is offline
RoboCop
AlliedModders Donor
Join Date: Dec 2010
Location: Dundee, Scotland
Old 08-02-2021 , 09:42   Re: [TFC] Bug Fixes v1.2
Reply With Quote #2

Yay!
__________________
vBulletin Webmaster Since 2001
Bots-United Webmaster and Botmaster
RoboCop is offline
Send a message via Skype™ to RoboCop
Suicide_Kid
Junior Member
Join Date: Mar 2022
Old 03-14-2022 , 23:01   Re: [TFC] Bug Fixes v1.2
Reply With Quote #3

Loaded this up on our server (OST) recently and found that it messes with the "random" class.
Suicide_Kid is offline
Suicide_Kid
Junior Member
Join Date: Mar 2022
Old 03-16-2022 , 16:55   Re: [TFC] Bug Fixes v1.2
Reply With Quote #4

Bees confirmed that it is also happening on the boisy server running a Windows server.
Suicide_Kid is offline
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 05-15-2022 , 10:46   Re: [TFC] Bug Fixes v1.2
Reply With Quote #5

Quote:
Originally Posted by Suicide_Kid View Post
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
__________________
+|- KARMA Respectively

HLM is offline
Suicide_Kid
Junior Member
Join Date: Mar 2022
Old 05-16-2022 , 12:20   Re: [TFC] Bug Fixes v1.3
Reply With Quote #6

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;
}
Suicide_Kid is offline
12Toastie
Junior Member
Join Date: Nov 2014
Old 05-23-2022 , 02:38   Re: [TFC] Bug Fixes v1.3
Reply With Quote #7

* - #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
12Toastie is offline
Infamanious
Senior Member
Join Date: Dec 2005
Old 06-12-2022 , 00:46   Re: [TFC] Bug Fixes v1.3
Reply With Quote #8

What about spys and instant-death-backstabs when your back is nowhere near the spy? Just a thought...
Infamanious is offline
12Toastie
Junior Member
Join Date: Nov 2014
Old 07-05-2022 , 05:08   Re: [TFC] Bug Fixes v1.3
Reply With Quote #9

but on the spy's screen your back IS there.. its a netcode thing completely....
12Toastie is offline
se7en
Junior Member
Join Date: Feb 2014
Old 06-09-2023 , 20:34   Re: [TFC] Bug Fixes v1.3
Reply With Quote #10

Quote:
Originally Posted by 12Toastie View Post
* - #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
se7en is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:25.


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