Author Topic: Blacklisting props from downloading to server  (Read 4317 times)

0 Members and 1 Guest are viewing this topic.

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Blacklisting props from downloading to server
« on: March 24, 2011, 01:11:59 PM »
There are certain props that will crash OSX users as soon as anyone *tries* to spawn them, even with prop restrictions in place.

So these models need to be completely removed from the server. The problem is, every time garrysmod updates, the props re-download. Is there some way to keep them from downloading?

I've tried to bring this issue to Garry's attention every way possible, and sadly I've seen no response or fix in over a month  :-\
My TTT server. Join the fun!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Blacklisting props from downloading to server
« Reply #1 on: March 24, 2011, 01:47:27 PM »
You've tried all the various spawn hooks to try blocking at that level?
Experiencing God's grace one day at a time.

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Blacklisting props from downloading to server
« Reply #2 on: March 25, 2011, 09:14:21 AM »
I've tried using addons, and I've tried using a script mentioned here.

All of them do their job in restricting the props just fine, but even still, as soon as that button to spawn a bad prop is clicked, all OSX users will crash to desktop instantly. Even if the prop is not on the restricted list, and it is removed by the user or admin after spawn, the server remains un-joinable until a server restart or map change.

The only thing I've found to work is removing the bad props completely.
My TTT server. Join the fun!

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: Blacklisting props from downloading to server
« Reply #3 on: April 07, 2011, 06:13:28 PM »
Out of curiosity do you know what makes the bad props crash people?
Assuming it's related to their models and not some weird thing like their names or something, I may be able to help you

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Blacklisting props from downloading to server
« Reply #4 on: April 10, 2011, 03:49:56 PM »
Cool, glad theres someone out there who might have some insight!
The models are:
props_phx/trains/double_wheels_base.mdl
props_phx/misc/t_light_single_a.mdl
props_phx/misc/t_light_single_b.mdl
props_phx/misc/t_light_x.mdl

And a texture that is I don't know what. We crash while browsing far enough down on the texture tool list.

It could be due to a texture? There would be at least two textures at fault, though, depending on the t_lights.
My TTT server. Join the fun!

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: Blacklisting props from downloading to server
« Reply #5 on: April 10, 2011, 03:56:24 PM »
A screenshot of the textures just before you crash would be helpful, then I can figure out which one (or at least which three) does it

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Blacklisting props from downloading to server
« Reply #6 on: April 10, 2011, 05:50:31 PM »
Krooks, have you tried asking/posting at the release forum or facepunch forum thread for Phx?
Hopefully, phx mod's readme would have some 'where to make bug report' information.
And of course, it would take a miracle to hope that the model packs author(s) are as vigilant as our team.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Blacklisting props from downloading to server
« Reply #7 on: April 10, 2011, 07:31:35 PM »
As far as I know PHX was unsupported, but so widely used that Garry recently added it to the official gmod release.

I will look up that thread and see if anyone there will listen, I already know for a fact that Garry wont.
I've emailed him, commented on his blog, started a thread and even posted in a thread Garry created specifically for the reason of reporting "small" bugs!

As for a screenshot, you need the spawn icon? or you need the actual object spawned in front of me? The nature of the crash is instant and straight to desktop, we never see anything spawned
My TTT server. Join the fun!

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: Blacklisting props from downloading to server
« Reply #8 on: April 11, 2011, 03:22:26 AM »
First of all, the usual way to block updaters from writing files you don't want them to is to take ownership of the files as an administrator and deny access to write/delete. That might make the update tool error, but I expect it'll either skip the file or retry it indefinitely. Might be worth doing in case it skips.

Screenshot - I meant the texture tool list just before you get to the bit where you crash.

So far I haven't found any common denominator between those models, but I did have an idea that might prevent the crashing:
Code: [Select]
local entMT = FindMetaTable( "Entity" )

local evilProps =
{
"props_phx/trains/double_wheels_base.mdl",
"props_phx/misc/t_light_single_a.mdl",
"props_phx/misc/t_light_single_b.mdl",
"props_phx/misc/t_light_x.mdl"
}

local setModel = entMT.SetModel

function entMT:SetModel( mdl )
for k, v in next, evilProps do
if mdl:lower():find( v, 1, true ) then return false end
end
return setModel( self, mdl )
end
That should stop the spawn menu (or anything else for that matter) from spawning the bad models (the change will never reach GMod's C++, let alone the engine, let alone your client). I haven't tested it.

If you clear your spawnicons and let the spawn menu regenerate them, do you crash? (you might want to take a backup first)

You could also try making an addon folder with "override" set to 1 in its info.txt, and putting an empty file everywhere there's meant to be a PHX model - e.g. new text file, rename it to t_light_x.mdl and put it in ADDON/models/props_phx/misc/. If that doesn't work on the client, you could put it on the server as well, but I think it should.
« Last Edit: April 11, 2011, 12:28:32 PM by edk141 »

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Blacklisting props from downloading to server
« Reply #9 on: April 11, 2011, 12:18:27 PM »
Wow, thanks for all the information/code, I will give it a try as soon as possible and reply back with the results!

As a note, they were not always a problem (well, at least I know for fact double_wheels_base was not), so to test the spawn icons is actually a good idea.

EDIT=========
is the code you provided supposed to be placed in garrysmod/lua/autorun/server on the server? I tried both that and /client, didn't work
« Last Edit: April 11, 2011, 03:53:06 PM by krooks »
My TTT server. Join the fun!

Offline edk141

  • Newbie
  • *
  • Posts: 23
  • Karma: 5
Re: Blacklisting props from downloading to server
« Reply #10 on: April 13, 2011, 05:35:07 AM »
Server, I didn't test it but I'll see if I can figure out why it's not working

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: Blacklisting props from downloading to server
« Reply #11 on: April 13, 2011, 08:22:32 AM »
Cool, thanks.
Most the regulars at the server know by now not to spawn those props, or I (and a couple others) go bye bye so no rush  ;D
My TTT server. Join the fun!