Page 1 of 1

WallBounce

Posted: Sat Sep 22, 2007 6:34 pm
by Landix
Huhu :)

I want to ask how i can a wallbounce add?

For the ground i use this here:

Code: Select all

	// calculate the exact velocity on landing
	dist = pm->ps->origin[2] - pml.previous_origin[2];
	vel = pml.previous_velocity[2];
	acc = -pm->ps->gravity;
	//newq3ball
	pm->ps->velocity[2] = -vel * 0.5; //2
	if (pm->ps->velocity[2] <= 0.001) {
        pm->ps->velocity[2] = 0;
I would that the BALL bounce from Walls, too. "A little ping pong" :)

Can anybody help me to add this?
Or is it to hard to add this!?

Thx for helping me out!

Re: WallBounce

Posted: Sun Sep 23, 2007 9:04 am
by ^misantropia^
Take a look at G_BounceMissile() in game/g_missile.c, that should put you on the right track.

Re: WallBounce

Posted: Sun Sep 23, 2007 7:39 pm
by Landix
I absolute can not figured out.
I think i know it works and i think it must be add to bg_pmove.c under crashland.

But i bring it not to work :(

BTW!
Here some new screens:

http://www.q3geoball.quakeit.de/forum/v ... .php?t=157

Re: WallBounce

Posted: Mon Sep 24, 2007 8:01 am
by Landix
Somebody offer me some code? :) Plz

*duck*