PDA

View Full Version : Hide under bush bug?


Starfire2001
03-27-2014, 03:39 PM
When a player hides under a bush and then changes levels, they become invisible to other players. If a player is hidden under a bush and another player walks into that level, the player hidden under the bush is invisible to then.

The issue seems to be that the players ani isn't being properly set on the serverside. When a player is hidden on a bush, their ani is still "carry" or "carrystill" serverside, while clientside it is "hidden" or "hiddenstill". The following script fixed the problem.

function onActionServerside() {
if(params[0] == "fixhidden") {
// Ensure the players gani is changed even after fix applied
player.ani = "hidden";
player.ani = "hiddenstill";
}elseif(params[0] == "checkhidden") {
// Need to do with all players in level, otherwise if a player
// enters a level where someone is already hiding under a bush,
// they won't be able to see that player.
for(temp.pl:players) {
pl.triggerclient("gui",this.name,"checkhidden");
}
}
}


//#CLIENTSIDE
function onPlayerEnters(){
triggerserver("gui",this.name,"checkhidden");
}

function onActionClientside() {
if(params[0] == "checkhidden") {
// Gani is recognized properly clientisde
if(player.ani == "hidden" || player.ani == "hiddenstill") {
triggerserver("gui",this.name,"fixhidden");
}
}
}


I'm wondering if this is just a problem on UN or if it is a problem everywhere.

Jakov_the_Jakovasaur
03-27-2014, 06:26 PM
i imagine its a synchronisation problem that came with the latest server update. the hidden gani is probably being synchronised to other players clients onPlayerEnters while the carryitem is not, and if you update their gani serverside that is probably forcing the carryitem to synchronise to other clients

as the hidden ganis can also use attr[3] you could possibly try messing around with something like:


//#CLIENTSIDE
function onPlayerEnters(){
if(!player.ani.name.starts("hidden"))
return;

if(carriesbush){
player.attr[3] = "bush.png";
return;
}
if(carriesrock){
player.attr[3] = "rock.png";
return;
}
if(carriesbomb){
player.attr[3] = "bomb.png";
return;
}
//etc
}

Jakov_the_Jakovasaur
03-29-2014, 11:39 AM
have you checked whether this could be a problem with the new client for mac users?

it could also be a problem caused by windows/linux & mac users having the different client version, there were some synchronisation bugs when people were able to use either v5 or v6

Admins
05-20-2014, 09:55 AM
Are those ganis existing on the server (/find) ?

Starfire2001
05-20-2014, 02:50 PM
Are those ganis existing on the server (/find) ?

Default game file(s) found (relative to levels/, max 50 files):
mainfiles/ganis/hidden.gani: downloadable, 301 byte, 2001-11-26 11:35:24
Default game file(s) found (relative to levels/, max 50 files):
mainfiles/ganis/hiddenstill.gani: downloadable, 248 byte, 2001-11-26 11:35:24

Admins
06-12-2014, 04:15 AM
I was asking because the default files were not accessible on Unholy Nation some weeks ago. This problem still happens?

Jakov_the_Jakovasaur
06-12-2014, 05:50 AM
does this mean that the bush image is no longer grabbed from sprites.png but rather the tileset?

Starfire2001
06-12-2014, 03:34 PM
I had a weapon in place that was dealing with the issue, just removed that weapon and it seems now that the problem is indeed fixed, so thanks.