fixed broken "editent" command

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4245 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
RandumKiwi
2009-03-06 02:31:45 +00:00
parent 5626011fdc
commit f2563836b0
+44 -3
View File
@@ -1,9 +1,50 @@
// CubeScript placed in this file is automatically executed on each startup.
// editent command
// "editent" command
// Note: The editent command can NOT define rotation/yaw inside the command!
// ... however, the current yaw of the player will define the rotation/yaw when using the command!
alias editent [
alias enttype (getenttype)
if (! (strcmp enttype "")) [
if (= (strcmp (getenttype) "mapmodel") 1) [
saycommand "/entset" $enttype (getentattr 1) (getentattr 2) (getentattr 3)
]
if (= (strcmp (getenttype) "light") 1) [
saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
]
if (= (strcmp (getenttype) "ammobox") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "sound") 1) [
saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
]
if (= (strcmp (getenttype) "health") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "playerstart") 1) [
saycommand "/entset" $enttype (getentattr 1)
]
if (= (strcmp (getenttype) "pistol") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "grenades") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "sound") 1) [
saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
]
if (= (strcmp (getenttype) "armour") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "akimbo") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "ladder") 1) [
saycommand "/entset" $enttype (getentattr 0)
]
if (= (strcmp (getenttype) "ctf-flag") 1) [
saycommand "/entset" $enttype (getentattr 1)
]
if (= (strcmp (getenttype) "clip") 1) [
saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
]
]
@@ -19,7 +60,7 @@ loop i (listlen $mapcommands) [
complete demo "demos" dmo
alias entcomplete [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel trigger ladder ctf-flag sound clip"]
alias entcomplete [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip"]
entcomplete newent
entcomplete clearents
entcomplete closestenttype