- parm = "";
- }
- else
- {
- parm = substring(cmdstr, sp + 1, -1);
- cmdstr = substring(cmdstr, 0, sp);
+ parm = substring(cmdstring, sp + 1, -1);
+ cmdstr = substring(cmdstring, 0, sp);
+ if(cmdstr == "sound")
+ {
+ // find the LAST word
+ for(;;)
+ {
+ sp = strstrofs(parm, " ", 0);
+ if(sp < 0)
+ break;
+ parm = substring(parm, sp + 1, -1);
+ }
+ precache_sound(parm);
+ }