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

Map Decals


Post New Thread Reply   
 
Thread Tools Display Modes
robotortoise
Senior Member
Join Date: Nov 2013
Old 07-23-2014 , 15:30   Re: Map Decals
Reply With Quote #531

Quote:
Originally Posted by Horsedick View Post
Did you read the whole thread?

There is a working version you just have to find it but I'll make it simple as I think its this one.

https://forums.alliedmods.net/showpost.php?p=986520
Thanks

Yep, works perfectly!
__________________
-Robotortoise [Palutena's Bro]

If you ever need help with Wii/Gamecube/DS sounds/music/ect., I'm your man!

Contact me via Steam

I don't bite.


How to loop and compress .wav files

Me and my friends' server

Last edited by robotortoise; 07-27-2014 at 23:51.
robotortoise is offline
FishDude
Member
Join Date: Jul 2014
Old 10-20-2014 , 16:16   Re: Map Decals
Reply With Quote #532

I have seen some problems with the display of decals:

Players on the server for some reason do not always see the decals on the walls.

For example, I easily reproduced the problem like this: I run TF2 with parameters -novid +CONNECT %my_srv_ard%. When the game finally started up - no decals! If I type in the console 'retry' - decals appears.

I tried to install sm_downloader.smx (for preload files), but it seems it does not help. Because if I did run TF2 again, decals still not visible (but they are just loaded by game client previous time).

I use the plugin version 1.02.

Quote:
Originally Posted by sigvatr View Post
if i join the server there are no decals

but if i retry, then they appear

what is wrong?
Yeah, same problem!

Last edited by FishDude; 10-20-2014 at 16:22.
FishDude is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 10-20-2014 , 17:35   Re: Map Decals
Reply With Quote #533

The problem is that the decals are sent when the player connect AND when you spray it, that's why anyone can see it if you just spray it. I kind of fixed it by sending it to all the players when some connects, so if there is anyone who can't see it, he/she will see it after someones connect. Of course this a horrible fix, the actual way to do this should be made using a timer and/or checking if the player is in game.
ClassicGuzzi is offline
FishDude
Member
Join Date: Jul 2014
Old 10-21-2014 , 08:46   Re: Map Decals
Reply With Quote #534

Quote:
Originally Posted by ClassicGuzzi View Post
The problem is that the decals are sent when the player (...)
I do not understand very well English (sorry!), so I want to clarify, are you talking about my problem? If so, it seems that the decision would not send the player sprays immediately, but after some time after connection, right?

Quote:
Originally Posted by ClassicGuzzi View Post
by sending it to all
Listen, I think that you draw a few sprays in the same place, no? Is it good looks translucent sprays, for example? Could you show your fix?

Something like this? -
Code:
public OnClientPostAdminCheck(client) {
    
    // Show him what we have
    decl Float:position[3];
    decl id, precache;
    
    new size = GetArraySize(adt_decal_id);
    for (new i=0; i<size; ++i) {
        id = GetArrayCell(adt_decal_id, i);
        precache = GetArrayCell(adt_decal_precache, id);
        GetArrayArray(adt_decal_position, i, _:position);
        TE_SetupBSPDecal(position, 0, precache);
        //        TE_SendToClient(client); // -
        TE_SendToAll(); //+
    }
}
With this code HALF-TRANSPARENT pictures looks horribly! Client really draws same decals more times in same place! Not good...

Attached Images
File Type: jpg fixme_decals1.jpg (76.9 KB, 619 views)

Last edited by FishDude; 10-21-2014 at 10:59. Reason: addec code and image
FishDude is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 10-21-2014 , 11:29   Re: Map Decals
Reply With Quote #535

Quote:
Originally Posted by FishDude View Post
With this code HALF-TRANSPARENT pictures looks horribly! Client really draws same decals more times in same place! Not good...
Wow I've never noticed because I use sprays without half transparent parts. I would recommend to you to add a timer... or maybe use OnClientPutInServer() (I'm not sure in that one).
ClassicGuzzi is offline
FishDude
Member
Join Date: Jul 2014
Old 10-21-2014 , 11:42   Re: Map Decals
Reply With Quote #536

Another strange thing I noticed: when the server does not have the players, and I am connected first, sprays painted already several times. It is strange, that this function has been called several times if there was no connection other clients.

In addition, during the first (only the first time!) сonnection some (2..3 of 40) sprays are really large, scaled x 1.0000, not as scale from VMT-file (typical x 0.125). This is really surprised me.

Quote:
Originally Posted by ClassicGuzzi View Post
I would recommend to you to add a timer...
A delay of approximately 3..5 seconds is exactly what we need. But I don't know how to do it. Who can help add a timer?

Last edited by FishDude; 10-21-2014 at 11:52. Reason: added info about strange sprays
FishDude is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 10-21-2014 , 16:00   Re: Map Decals
Reply With Quote #537

Sure, but I'm not at home right now I'll be back in 5 or so hours, I will do it as soon I can!
ClassicGuzzi is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 10-22-2014 , 19:52   Re: Map Decals
Reply With Quote #538

Here, try this:

Code:
public OnClientPostAdminCheck(client) 
{
	CreateTimer(5.0, timerSprayDecal, GetClientUserId(client));
}
public timerSprayDecal(Handle:timer, any:userID)
{
	// Show him what we have
	decl Float:position[3];
	decl id, precache;
	
	new client = GetClientOfUserId(userID)
	
	if (client < 1 || client > MaxClients || !IsClientInGame(client))
		return
	
	new size = GetArraySize(adt_decal_id);
	for (new i=0; i<size; ++i) 
	{
		id = GetArrayCell(adt_decal_id, i);
		precache = GetArrayCell(adt_decal_precache, id);
		GetArrayArray(adt_decal_position, i, _:position);
		TE_SetupBSPDecal(position, 0, precache);
		TE_SendToClient(client); 
		//TE_SendToAll();
	}
}
I used userID so there wont be any problem if the player disconnects. I didn't try it though.

Last edited by ClassicGuzzi; 10-22-2014 at 19:52.
ClassicGuzzi is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 10-22-2014 , 21:40   Re: Map Decals
Reply With Quote #539

Is there anything related to decal scale or should that be done through editing the decal and uploading a new one every time..?
__________________
Chdata is offline
FishDude
Member
Join Date: Jul 2014
Old 10-22-2014 , 23:02   Re: Map Decals
Reply With Quote #540

Quote:
Originally Posted by ClassicGuzzi View Post
Here, try this:
Yet did not have time to check: faced with some other error of that plugin. ((( I had to draw decals on maps koth_viaduct_event and koth_lakeside_event, and... I could not do it!

Judging by the conversations of people, this plugin is not able to work with empty cfg-file, so I slipped him the configuration from another map. I enter the command immediately after starting server and maps:

Quote:
] sm_savedecal all
[SM] Saving Decals to File eatureType...
[SM] Saved 60 Decal Positions.
"eatureType"? wait, what?!

Ok, lets paint another decal, and THEN try to save cfg:
Quote:
] sm_paintdecal note
[SM] Decal 61: note painted on Map koth_viaduct_event!
[SM] Decal Position: -1427.653198, -3201.279296, 64.031250
] sm_savedecal all
[SM] Saving Decals to File er/sprayer.wav...
[SM] Saved 61 Decal Positions.
"er/sprayer.wav"??? No way!
And of course, the configuration is not saved.

I've seen complaints about the error above in the topic, but on other maps plug somehow works normally. I do not understand how this could be.

Last edited by FishDude; 10-22-2014 at 23:11.
FishDude 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 12:09.


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