From: <wel...@us...> - 2009-02-20 10:25:49
|
Revision: 3070 http://planeshift.svn.sourceforge.net/planeshift/?rev=3070&view=rev Author: weltall2 Date: 2009-02-20 10:25:44 +0000 (Fri, 20 Feb 2009) Log Message: ----------- Added instance slide Modified Paths: -------------- trunk/data/help.xml trunk/src/server/adminmanager.cpp Modified: trunk/data/help.xml =================================================================== --- trunk/data/help.xml 2009-02-20 06:26:13 UTC (rev 3069) +++ trunk/data/help.xml 2009-02-20 10:25:44 UTC (rev 3070) @@ -737,7 +737,9 @@ Shows the GM GUI, a window with a player list and quick access to many commands.</topic> <topic name="/slide">/slide target direction distance -Slides the target object/NPC/player in the direction specified (L,R,F,B,U,D,T). Moves one space or the distance specified. The "direction" 'T' turns the target. (in degrees; default is 90)</topic> +Slides the target object/NPC/player in the direction specified (L,R,F,B,U,D,T,I). Moves one space or the distance specified. +The "direction" 'T' turns the target. (in degrees; default is 90) +The "direction" 'I' changes target instance. (it's relative to current instance)</topic> <topic name="/snow">/snow sector [flakes [length [fade]]|stop] It creates snow effect in a specific sector, with a specific number of flakes, the length of the effect (in milliseconds) and its fading Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2009-02-20 06:26:13 UTC (rev 3069) +++ trunk/src/server/adminmanager.cpp 2009-02-20 10:25:44 UTC (rev 3070) @@ -3766,7 +3766,7 @@ if (data.direction.IsEmpty()) { - psserver->SendSystemError(me->clientnum, "Syntax: /slide [name|'target'] [direction] [distance]\nAllowed directions: U D L R F B T"); + psserver->SendSystemError(me->clientnum, "Syntax: /slide [name|'target'] [direction] [distance]\nAllowed directions: U D L R F B T I"); return; } @@ -3781,6 +3781,7 @@ csVector3 pos; float yrot; iSector* sector = 0; + InstanceID instance = target->GetInstance(); target->GetPosition(pos, yrot, sector); @@ -3814,13 +3815,16 @@ slideAmount = (data.amt == 0)?90:data.amt; // defualt to 90 deg yrot += slideAmount*PI/180.0; // Rotation units are degrees break; + case 'I': + instance += slideAmount; + break; default: - psserver->SendSystemError(me->clientnum, "Invalid direction given (Use one of: U D L R F B T)"); + psserver->SendSystemError(me->clientnum, "Invalid direction given (Use one of: U D L R F B T I)"); return; } // Update the object - if ( !MoveObject(client,target,pos,yrot,sector,target->GetInstance()) ) + if ( !MoveObject(client,target,pos,yrot,sector,instance) ) return; target->UpdateProxList(false); // Update ProxList if needed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |