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

How to remove map decal?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 07-20-2018 , 16:13   How to remove map decal?
Reply With Quote #1

This common stock

PHP Code:
stock void TE_SetupBSPDecal(const float vecOrigin[3], int entityint index
{
    
TE_Start("BSP Decal"); 
    
TE_WriteVector("m_vecOrigin"vecOrigin); 
    
TE_WriteNum("m_nEntity"entity); 
    
TE_WriteNum("m_nIndex"index); 

Will add a decal to any vector position...but they seem to just stack up and once the users decal limit (mp_decals) is reached, understandably, no more decals will show up unless you rejoin/restart. Is there a way to remove the decals created with this stock?

Here is a great example using this stock. From what I can tell it doesn't actually remove it from the map, just the array.
https://github.com/bcserv/map-decals...ecals.sp#L1372

Thanks all!
__________________
{__ PIRATES COVE __} ● HIGH-KILL Community | Stats ●
Half-Life 2: Deathmatch
66.151.244.149:27016 => CONNECT

Last edited by scorpius2k1; 07-20-2018 at 16:56. Reason: Add link
scorpius2k1 is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-20-2018 , 18:07   Re: How to remove map decal?
Reply With Quote #2

You could add a life span for x amount of seconds to the decals and maybe a repeating timer to spawn them after they expire. Then later stop the timer if you don't want a specific decal. Just an idea
__________________

Last edited by LenHard; 07-20-2018 at 18:08.
LenHard is offline
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 07-20-2018 , 18:11   Re: How to remove map decal?
Reply With Quote #3

Quote:
Originally Posted by LenHard View Post
You could add a life span for x amount of seconds to the decals
Thanks LenHard, I have no idea if that is even possible given the provided stock. If this is doable, I am all ears because that would be the perfect solution. The source engine by default when the decal limit is reached will remove the oldest decals first when a new one is spawned. I have no idea why this call in SourceMod seems to bypass that feature and they just stay there.
__________________
{__ PIRATES COVE __} ● HIGH-KILL Community | Stats ●
Half-Life 2: Deathmatch
66.151.244.149:27016 => CONNECT
scorpius2k1 is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-20-2018 , 18:25   Re: How to remove map decal?
Reply With Quote #4

Quote:
Originally Posted by scorpius2k1 View Post
Thanks LenHard, I have no idea if that is even possible given the provided stock. If this is doable, I am all ears because that would be the perfect solution. The source engine by default when the decal limit is reached will remove the oldest decals first when a new one is spawned. I have no idea why this call in SourceMod seems to bypass that feature and they just stay there.
I see, well I just did quick research and it seems that you can't put a life limit on decals nor get rid of them easily. I'd recommend you to use an entity of some sort, depending on what you're using the decals for, try env_sprite_oriented (that would allow you to be able to kill the entity later on)
__________________

Last edited by LenHard; 07-20-2018 at 18:27.
LenHard is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-21-2018 , 13:08   Re: How to remove map decal?
Reply With Quote #5

I tried that before -> https://forums.alliedmods.net/showthread.php?t=292976
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Reply


Thread Tools
Display Modes

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 04:58.


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