Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Stoned on November 04, 2008, 06:35:30 AM

Title: UPS at GeoForts
Post by: Stoned on November 04, 2008, 06:35:30 AM
Well, i know that UPS is made for SandBox, but it works pretty well at GeoForts too.

My Problem is, that if someone leaves the server, the props doesn't get free'd.

I looked into player_leave.lua but it doesn't helped very much :/

Any ideas of fixing this?

Title: Re: UPS at GeoForts
Post by: Megiddo on November 04, 2008, 04:38:16 PM
Any errors in console?
Title: Re: UPS at GeoForts
Post by: Stoned on November 05, 2008, 05:47:28 AM
nope :/

€dit: if you want to test it yourself -> 217.168.153.250:27080
Title: Re: UPS at GeoForts
Post by: JamminR on November 05, 2008, 04:05:11 PM
I'd suspect if you have the latest release our UPS that it might be an addon conflict.
Worst case, the game mode itself.
If the addon or code that (may be)/is causing conflict isn't properly releasing the player disconnect hook, that prevents all other scripts from running.

Do your props release when in Sandbox mode?
If so, that points to gamemode.
Title: Re: UPS at GeoForts
Post by: Stoned on November 06, 2008, 04:23:17 AM
function GM:PlayerDisconnected(pl)
   self:ClosePlayer(pl,true)
end

the disconnect function :/
Title: Re: UPS at GeoForts
Post by: JamminR on November 06, 2008, 07:51:03 PM
Well, I found this (http://code.google.com/p/geoforts/source/browse/trunk/gamemodes/geoforts/gamemode/init.lua?r=3) [ http://code.google.com/p/geoforts/source/browse/trunk/gamemodes/geoforts/gamemode/init.lua?r=3 ] while searching for google term "self:PlayerClose"
It also has on that page the actual "PlayerClose" function. (See line 920)

I'm not experienced enough to know exactly what of the following will fix it, so am making educated guesses.
Try the following, in this order;
1) in that bit of player disconnect code, before the last 'end', add 'return'
Code: [Select]
function GM:PlayerDisconnected(pl)
   self:ClosePlayer(pl,true)
return
end
Restart server.
See if that breaks anything, and helps UPS.
I'm thinking that is the best bet and still not break anything.

If that doesn't work, try adding to the actual ClosePlayer function at it's very end the word return.
If your gamemode code matches the google links (which might be out of date), before 942,  you'd also add 'return'
I'm not going to post the entire code bit in case it would be different. Just look at the google link above and you should be able to find where to insert 'return'
Do that only if adding the first return doesn't work.

[rant]
To be honest, not using return on most hooks, in my opinion, is just sloppy.
Too many addons rely on hooks. Unless you just NEED to keep other addons from running, hooks should return with no modification to the original data.
[end rant]