lms bugged

Started by zeko, May 24, 2015, 10:36 AM

Previous topic - Next topic

zeko

Quote<NY-Server>    [@INDEX@]: [MA]MuKuNd^
<NY-Server> Error occurring in Warchief-SQ.nut:524, function CheckPlayerMove.

here is the 524 line

if ( !InPoly( Pos.x, Pos.y, LocCoord ) )
full checkplayermove function

function CheckPlayerMove()

{

     foreach( plr in PlrLms )

     {

            if ( plr )

            {

                   local Pos = plr.Pos;

                   if ( PlrLms.rawin( plr.Name ) && LMSData.LMS )

                   {

                       if ( !InPoly( Pos.x, Pos.y, LocCoord ) )

                       {

                             Announce( "\x10 \x10 \x10 \x10 \x10 ~h~ Limit in excess", plr );

                             local param = split( LmsSite[ LMSData.NLoc ], " " );

                             plr.Pos = Vector( param[1].tofloat(), param[2].tofloat(), param[3].tofloat() );

                       }

                   }

            }

     }

}

ℛḝξ☂

Where's the InPoly?
I may be a slow walker but I am always walking.

Stormeus

That's not how InPoly works. It takes a point and checks if it's inside a quadrilateral, like this:

http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/InPoly

zeko

isn't  LocCoord Works ?

MacTavish


Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

zeko

i understand but
this function was worked perfect on 0.3 server without any error then why we use LocCoord ?

Stormeus

What is LocCoord, a vector? An array of vectors? If you only gave it one vector, that's not how InPoly works, and never has been.