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

[ANY] Resizable Sprays (v3.4.0, 2022/10/16)


Post New Thread Reply   
 
Thread Tools Display Modes
Sreaper
髪を用心
Join Date: Nov 2009
Old 05-12-2021 , 22:01   Re: [ANY] Resizable Sprays
Reply With Quote #11

Quote:
Originally Posted by Sappykun View Post
Changelog for version 1.1.0:

- Replace world decals with regular (entity) decals. Regular decals can be sprayed on brush entities while also being controlled by r_decals.
- Allow admins to spray other client's sprays by entering a single target name as an optional second argument to sm_spray or sm_bspray.
- Auto-create required directory for plugin to function
Appreciate the update. However the new version you uploaded doesn't seem to compile for me (with no changes) without erroring. I'm using the scripting folder that came with my Sourcemod install.
Code:
 SourceMod Version: 1.10.0.6502
Code:
resizablesprays.sp

(30) : error 001: expected token: "{", but found "struct"
(31) : error 001: expected token: "public", but found "int"
(32) : error 001: expected token: "}", but found "int"
(40) : error 054: unmatched closing brace ("}")
(118) : error 104: cannot find any methods for Spray
(118) : warning 213: tag mismatch
(119) : error 104: cannot find any methods for Spray
(119) : warning 213: tag mismatch
(130) : error 104: cannot find any methods for Spray
(135) : error 104: cannot find any methods for Spray
(141) : error 104: cannot find any methods for Spray
(141) : warning 213: tag mismatch
(142) : error 104: cannot find any methods for Spray
(147) : error 104: cannot find any methods for Spray
(148) : error 104: cannot find any methods for Spray
(148) : warning 213: tag mismatch
(151) : error 104: cannot find any methods for Spray
(151) : warning 213: tag mismatch
(155) : error 104: cannot find any methods for Spray
(155) : warning 213: tag mismatch
(159) : error 104: cannot find any methods for Spray
(167) : error 104: cannot find any methods for Spray
(168) : error 104: cannot find any methods for Spray
(169) : error 104: cannot find any methods for Spray
(169) : warning 215: expression has no effect
(169) : error 001: expected token: ";", but found "]"
(169) : error 029: invalid expression, assumed zero
(169) : fatal error 190: too many error messages on one line
The old version had no compile issues.

Last edited by Sreaper; 05-12-2021 at 22:52.
Sreaper is offline
Sappykun
Member
Join Date: Nov 2019
Old 05-13-2021 , 01:11   Re: [ANY] Resizable Sprays
Reply With Quote #12

Quote:
Originally Posted by Sreaper View Post
Appreciate the update. However the new version you uploaded doesn't seem to compile for me (with no changes) without erroring. I'm using the scripting folder that came with my Sourcemod install.

The old version had no compile issues.
I switched to storing spray data in an enum struct to help keep the code cleaner. Enum structs are a 1.10 only thing.
What version is your Sourcepawn compiler? I get no complaints with SourcePawn Compiler 1.10.0.6502.

Code:
l4d2@ns531866:~/addons/sourcemod/scripting$ ./spcomp64 resizablesprays.sp
SourcePawn Compiler 1.10.0.6502
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC

Code size:            11608 bytes
Data size:             4860 bytes
Stack/heap size:      16384 bytes
Total requirements:   32852 bytes
Sappykun is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 05-13-2021 , 01:38   Re: [ANY] Resizable Sprays
Reply With Quote #13

Quote:
Originally Posted by Sappykun View Post
I switched to storing spray data in an enum struct to help keep the code cleaner. Enum structs are a 1.10 only thing.
What version is your Sourcepawn compiler? I get no complaints with SourcePawn Compiler 1.10.0.6502.

Code:
l4d2@ns531866:~/addons/sourcemod/scripting$ ./spcomp64 resizablesprays.sp
SourcePawn Compiler 1.10.0.6502
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2018 AlliedModders LLC

Code size:            11608 bytes
Data size:             4860 bytes
Stack/heap size:      16384 bytes
Total requirements:   32852 bytes

I thought I was using it. I'll try to redownload that scripting folder again, thank you.
Sreaper is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 05-13-2021 , 23:32   Re: [ANY] Resizable Sprays (v1.1.0, 2021-05-12)
Reply With Quote #14

I have non admins getting debug messages in the developer console such as this:
Code:
'materials/resizablesprays/b9971691_0-4000.vmt' already exists!
Are you able to prevent these? Also an sm_overlay function would be cool to have for player sprays. (r_screenoverlay). But it would require UnlitGeneric or the sprays are going to flicker / have transparency.

Last edited by Sreaper; 05-13-2021 at 23:36.
Sreaper is offline
Sappykun
Member
Join Date: Nov 2019
Old 05-14-2021 , 03:13   Re: [ANY] Resizable Sprays (v1.1.0, 2021-05-12)
Reply With Quote #15

Quote:
Originally Posted by Sreaper View Post
I have non admins getting debug messages in the developer console such as this:
Code:
'materials/resizablesprays/b9971691_0-4000.vmt' already exists!
Are you able to prevent these?
Unfortunately, no. Those messages aren't coming from the plugin, they're coming from the client's engine.

Quote:
Also an sm_overlay function would be cool to have for player sprays. (r_screenoverlay). But it would require UnlitGeneric or the sprays are going to flicker / have transparency.
That's beyond the scope of this plugin.
Sappykun is offline
Sappykun
Member
Join Date: Nov 2019
Old 05-15-2021 , 14:31   Re: [ANY] Resizable Sprays (v1.1.2, 2021-05-15)
Reply With Quote #16

Changelog for version 1.1.2:

- Fixed error with computing spray distance which effectively prevented non-admins from spraying.
Sappykun is offline
Sappykun
Member
Join Date: Nov 2019
Old 07-07-2021 , 18:38   Re: [ANY] Resizable Sprays (v2.0.0-RC5, 2021/07/07)
Reply With Quote #17

I've been working on a second version of this plugin (which can be found here) that I believe is more responsive and easier to use.

I don't want to release it just yet since there's one major issue that I want to fix: queuing downloads takes an incredibly long time. This becomes even more apparent with more players on the server; it can take up to 2 minutes for one file to get sent to everyone in a 33 player game. With 33 sprays being sent to 33 players, that creates 1089 queued downloads, which can take up to half an hour to send out all the files properly.

I don't know how this can be fixed, since the SendFile method in the NetChannel class simply adds the file to a file transfer queue. Is there another way of directly forcing the server to send a client a file? Can the queue be manipulated somehow? I'm not quite sure what to do.

Last edited by Sappykun; 07-07-2021 at 18:38.
Sappykun is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 10-11-2021 , 13:58   Re: [ANY] Resizable Sprays (v2.0.0-RC5, 2021/07/07)
Reply With Quote #18

What is a maximum size of original spray is normally supported/should be in order to work correctly in game?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Sappykun
Member
Join Date: Nov 2019
Old 11-04-2021 , 01:48   Re: [ANY] Resizable Sprays (v2.0.0-RC5, 2021/07/07)
Reply With Quote #19

It's been a while, but I've been working on yet another version of this plugin that I've dubbed v3.0.0-RC4. This version runs much better than v2, and I'm more confident in releasing it here.

Going from v1 to v3, the plugin now uses a custom fork of the LateDL extension (builds for L4D2 and TF2 are provided). The only major difference in how the two are used is the scale factor, which is now relative to a standard spray size (a scale of 1 produces a 64x64 spray, 2.0 makes a 128x128 spray, etc). Everything else is optimization under the hood as I learned to wrestle with a single-band 50 kB/s channel for each player.

Quote:
Originally Posted by Dragokas View Post
What is a maximum size of original spray is normally supported/should be in order to work correctly in game?
All versions of the plugin should support any spray that passes through the client's size checks (512 kB max size).

Last edited by Sappykun; 11-04-2021 at 01:49.
Sappykun is offline
Sappykun
Member
Join Date: Nov 2019
Old 11-15-2021 , 00:15   Re: [ANY] Resizable Sprays (v3.2.0, 2021/11/14)
Reply With Quote #20

Released v3.2.0.

Turns out if a client tries to use a spray file before it exists on their client, it will break any use of that decal, including vanilla sprays. This new version is now incredibly strict when determining which clients to precache decals for.
Since netchannel is so limited, the plugin also tries very hard to manage file downloads and only let users spray when other clients are ready.

Really wish there was a way to increase the netchannel bandwidth, but it's locked at 50kB/s on both server and client.
Sappykun is offline
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:56.


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