Tremulous Forum

Mods => Modding Center => Topic started by: rotacak on April 15, 2009, 02:08:58 pm

Title: Independent slick surface
Post by: rotacak on April 15, 2009, 02:08:58 pm
Hi,
I want to ask if is possible to use slick surface (behavior) only when I want, even if slick surface is not in map at all.

Something like:
if (playerID4_is_granger == 1)
{
playerID4_ground_surface = slick;
}

And in game all grangers will slide even on standard surface. I tried search source codes but I found nothing, only few things on client side :-(
Title: Re: Independent slick surface
Post by: gimhael on April 15, 2009, 02:57:37 pm
If you build your own game.qvm you can do this: in the bg_misc.c file there is the list of all classes, and each class has an individiual friction value. The value is the same for all, but if you reduce the friction for granger/adv. granger you should get that effect.

If you want to have more complicated things, you'll probably have to mess with PM_Friction in bg_pmove.c.
Title: Re: Independent slick surface
Post by: David on April 15, 2009, 04:12:13 pm
It's worth noting that changing anything in bg_ will require a download to work properly.
Title: Re: Independent slick surface
Post by: Amanieu on April 15, 2009, 04:27:14 pm
It will require a download to make client-side prediction work properly, but the game will still work without it.
Title: Re: Independent slick surface
Post by: David on April 15, 2009, 04:38:10 pm
I said "properly".  It'll run fine, just won't be very playable.
Title: Re: Independent slick surface
Post by: rotacak on April 15, 2009, 04:55:06 pm
And there is no other way how server can tell to client that there is slick surface? Client prediction is based on information from local map.pk3?

And one more question: is possible to detect if player granger will touch triggers in map? For example:
if (granger touch trigger_hurt)
{
kill that granger;
}
Title: Re: Independent slick surface
Post by: Archangel on April 15, 2009, 07:02:08 pm
i would assume you could modify the check to see if the client is touching a trigger_hurt, to confirm their class  :granger: :granger: