News: SMF - Just Installed!
 
Welcome, Guest. Please login or register.
+  AnthraxBio
|-+  Return to Castle Wolfenstein
| |-+  Coding Tutorials
| | |-+  Dead Body Stay
« previous next »
Pages: [1] Print
Author Topic: Dead Body Stay  (Read 265 times)
SkreamerVirii
Administrator
Full Member
*****
Posts: 133


View Profile
« on: September 03, 2008, 11:17:59 PM »

In this Tutorial i will show you how to make a dead body stay around for the entire round time

So let us begin
we wil be working in the g_client.c and
so scroll down till you find
/*
=============
BodySink
After sitting around for five seconds, fall into the ground and dissapear
=============
*/
void BodySink( gentity_t *ent ) {
if ( level.time - ent->timestamp > 6500 ) {
// the body ques are never actually freed, they are just unlinked
trap_UnlinkEntity( ent );
ent->physicsObject = qfalse;
return;
}
ent->nextthink = level.time + 1000;
ent->s.pos.trBase[2] -= 1;
}
Change this

ent->nextthink = level.time + 1000;
ent->s.pos.trBase[2] -= 1;
}
to this
ent->nextthink = level.time + 1000000;
ent->s.pos.trBase[2] -= 1;
}

1000000 is infinite
compile and go play now go kkill yourself but dont gib your self and then when you spawn back you will see your dead body

Enjoy!!!

 
« Last Edit: September 03, 2008, 11:24:12 PM by SkreamerVirii » Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Free SMF 1.1.5 Forum Theme by Tamuril. © 2008.