View Single Post
  #2  
Old 05-23-2011, 01:24 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by Akkadius View Post
Quick fix for Secret's Camerashake command, the command was not giving a usage when the appropriate arguments were not given.

Thanks, Akka

Code:
Index: command.cpp
===================================================================
--- command.cpp	(revision 1902)
+++ command.cpp	(working copy)
@@ -11073,8 +11073,7 @@
 {
 	if(c)
 	{
-
-		if(sep->arg[1][0] &&  sep->arg[2][0]);
+		if(sep->arg[1][0] &&  sep->arg[2][0])
 		{
 		ServerPacket *pack = new ServerPacket(ServerOP_CameraShake, sizeof(ServerCameraShake_Struct));
 		memset(pack->pBuffer, 0, sizeof(pack->pBuffer));
@@ -11086,8 +11085,11 @@
 		safe_delete(pack);
 		return;
 		}
+		else
+		{
+		c->Message(0, "Usage -- #camerashake [duration], [intensity [1-10])");
+		}
 	}
-	c->Message(13, "Usage -- #camerashake [duration], [intensity [1-10])");
 }
 
 void command_disarmtrap(Client *c, const Seperator *sep)
I'll commit this when i'm not drunk, if someone doesn't beat me to it.
Reply With Quote