Author Topic: Independent slick surface  (Read 4192 times)

rotacak

  • Posts: 761
  • Turrets: +39/-64
Independent slick surface
« 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 :-(

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: Independent slick surface
« Reply #1 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.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Independent slick surface
« Reply #2 on: April 15, 2009, 04:12:13 pm »
It's worth noting that changing anything in bg_ will require a download to work properly.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: Independent slick surface
« Reply #3 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.
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Independent slick surface
« Reply #4 on: April 15, 2009, 04:38:10 pm »
I said "properly".  It'll run fine, just won't be very playable.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

rotacak

  • Posts: 761
  • Turrets: +39/-64
Re: Independent slick surface
« Reply #5 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;
}

Archangel

  • Guest
Re: Independent slick surface
« Reply #6 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: