Raised This Month: $51 Target: $400
 12% 

[L4D2] Charger Power - Objects Glow (1.7) [27-Jul-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
blaquicat
Member
Join Date: Aug 2009
Old 11-16-2012 , 05:35   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #11

Hello there..
I see a problem with the plugin, sometimes the glow apper on other class..
like this image:
http://steamcommunity.com/sharedfile.../?id=101034898
With spitter i see the glow, i see other bugs too, but forget to take a screenshot
blaquicat is offline
Accelerator
Senior Member
Join Date: Dec 2010
Location: Russia
Old 12-04-2016 , 02:53   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #12

Game have lags with this plugin, when kill or spawn chargers.
https://forums.alliedmods.net/showthread.php?t=291109
On campaign crash course at the bridge and on the bridge lags are always present.

Last edited by Accelerator; 12-04-2016 at 03:10.
Accelerator is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-04-2016 , 03:21   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #13

Quote:
Originally Posted by Accelerator74 View Post
Game have lags with this plugin, when kill or spawn chargers.
https://forums.alliedmods.net/showthread.php?t=291109
On campaign crash course at the bridge and on the bridge lags are always present.
I'm pretty sure this plugin isn't the cause of Versus always lagging (for me though). In fact, I'm using it in my servers and I already tested on a local dedicated server with or without this plugin. Seems to me the lags when playing Versus are part of the game's bugs.
cravenge is offline
Accelerator
Senior Member
Join Date: Dec 2010
Location: Russia
Old 12-04-2016 , 03:56   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #14

Tested by me on 2 servers (local (friend and me) and public with 18 players). The reason it was.
After I disabled the plugin, the players did not complain about the lag.

Last edited by Accelerator; 12-04-2016 at 03:58.
Accelerator is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-04-2016 , 05:01   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #15

Well, if that's the case, I'll update this plugin and find out what's causing the lag during "player_death" or "charger_killed" events.
cravenge is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-04-2016 , 16:11   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #16

Which version of sourcemod? Have you updated L4D2 or sourcemod, which could cause the problem?

Maybe theres an event missing to clear up the objects which are created for the glow. I think it creates an entity to make it glow rather than making the object itself glow (due to engine limitation/restriction).. I can't remember and haven't looked through the code. If that's the case it could spawn too many and cause lag. Hopefully you can find out cravenge, I don't have the game setup etc.
__________________

Last edited by Silvers; 12-04-2016 at 16:14.
Silvers is offline
Accelerator
Senior Member
Join Date: Dec 2010
Location: Russia
Old 12-04-2016 , 23:13   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #17

Quote:
Originally Posted by Silvers View Post
Which version of sourcemod? Have you updated L4D2 or sourcemod, which could cause the problem?
Latest version game, sourcemod and metamod.
This problem has always been (and this is 2 years my server). Just before I did not attach importance to this, I thought it is a glitch of the game.

P.S.: I think the server simply does not have time to execute code quickly for one frame, which causes lag. I tried:
Code:
CheckClient(client)
{
	if( g_bShowProp[client] == true )
	{
		g_bShowProp[client] = false;

		RequestFrame(ResetHook, client);
	}
}

public ResetHook(client)
{
	new entity, done;
	for( new i = 0; i < MAX_ALLOWED; i++ )
	{
		entity = g_iEntities[i];
		if( entity && (entity = EntRefToEntIndex(entity)) != INVALID_ENT_REFERENCE )
		{
			SetEntProp(entity, Prop_Send, "m_nGlowRange", 1);
			SDKUnhook(entity, SDKHook_SetTransmit, OnTransmit);
			done++;
		}
	}

	if( done )
	{
		CreateTimer(0.1, TimerHook);
	}
}

public Action:TimerHook(Handle:timer)
{
	new entity;
	for( new i = 0; i < MAX_ALLOWED; i++ )
	{
		entity = g_iEntities[i];
		if( entity && (entity = EntRefToEntIndex(entity)) != INVALID_ENT_REFERENCE )
		{
			SetEntProp(entity, Prop_Send, "m_nGlowRange", g_iCvarRange);
			SDKHook(entity, SDKHook_SetTransmit, OnTransmit);
		}
	}
}
Later, I will inform you about the results.

Last edited by Accelerator; 12-04-2016 at 23:15.
Accelerator is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-05-2016 , 09:05   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #18

Update (1.2)
: Transitioned to new syntax.
: New method of applying glow to chargeable entities.
: Hopefully fixed the lag part which I, unfortunately, can't reproduce/replicate.

Report for bugs if there are any.
Attached Files
File Type: sp Get Plugin or Get Source (super_charge_glow-l4d2.sp - 273 views - 12.0 KB)
cravenge is offline
Accelerator
Senior Member
Join Date: Dec 2010
Location: Russia
Old 12-05-2016 , 10:16   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #19

Glow for all players? Not good
My version. No laggs. Tested on local server (with friend) and public (18 players).
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_charger_power_glow.sp - 311 views - 14.8 KB)

Last edited by Accelerator; 12-05-2016 at 10:18.
Accelerator is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 12-06-2016 , 04:28   Re: [L4D2] Charger Power - Objects Glow (1.1) [02-Jun-2012]
Reply With Quote #20

Quote:
Originally Posted by Accelerator74 View Post
Glow for all players? Not good
My version. No laggs. Tested on local server (with friend) and public (18 players).
Is that what my version is doing? If so, I might check again.
cravenge 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 08:25.


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