modmdlbounceN - load custom gib/static grenade models via cubescript

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7216 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2013-02-16 05:54:05 +00:00
parent fec6978aed
commit 6bca9438a8
6 changed files with 38 additions and 6 deletions
+10
View File
@@ -509,13 +509,23 @@ void renderbounceents()
switch(p->bouncetype)
{
case BT_NADE:
if (identexists("modmdlbounce3"))
copystring(model, getalias("modmdlbounce3"));
else
copystring(model, "weapons/grenade/static");
break;
case BT_GIB:
default:
{
uint n = (((4*(uint)(size_t)p)+(uint)p->timetolive)%3)+1;
defformatstring(widn)("modmdlbounce%d", n-1);
if (identexists(widn))
copystring(model, getalias(widn));
else
formatstring(model)("misc/gib0%u", n);
int t = lastmillis-p->millis;
if(t>p->timetolive-2000)
{