
func_gravity : allow change of gravity strenght and direction. 
By dante_uk ( Neil J Martin ).
Version 1.1.10

Changes:
1.1.10		Bug fixes only.
1.1.9-1.1.5	tests only.
1.1.4		New properties.
		Now using Physics_Monster::CheckGround after changing gravity for monsters.
		Scripting events added for turning on/off a func_gravity.
1.1.3-1.0.0	early versions, can't remember what I changed :)

Properties:
	TYPE	NAME			DEFAULT / DESCRIPTION
	idVec3	gravity;		// 0 0 -1066 / new gravity value.
	bool	playerOnly;		// 0 / effect only the player.
	bool	monstersOnly;		// 0 / effect only monsters.
	bool	triggeredByOnly;	// 0 / effect only the entity that touch the func_gravity.
	bool	playerToo;		// 1 / effect the player too.
	bool	insideOnly;		// 0 / effect only entities inside the func_gravity.
	bool	monsterTrig;		// 0 / monsters can trigger the func_gravity.
	bool	activated;		// 1 / if off then event_touched is ignored.
	bool	stopPlayer;		// 0 / stop all player movement b4 changing gravity direction.
	bool	shiftPlayer;		// 1 / shift player away from ground before changing gravity.
	bool	debug;			// 1 / displays lots of info to console.
	float	changeRate;		// 0 / used for smoothing of gravity change. 0 = no smoothing. 
	
	
Known Issues ( main ones at least )
1. using silly numbers to move player or monster away from ground before switching gravity, should 
 really be checking the direction of gravity change and move by the right amount depending on width
 or height of clipmodel.
2. some gravity changes make the player face the wrong way afterward. This seems to be a problem in the physics code (clipmodel stuff), I'm looking at various ways to solve this, so far I've had some interesting results!  but nothing helpful.

Feature Ideas / Suggestions:
* Smooth the transition from current gravity value to the new vale. ( mostly done )
* targetting. target a func_null in the map so gravity sucks/pulls(?) in that direction.
* finding a way to reset gravity back to it's original value for a an object/actor when it leaves the 
volume of the func_gravity.
* find a way to make it also effect friction. ( then it would be good as a water like entity. )

A few suggested uses of this mod:
* for creating a trigger to affect worldgravity and activate monsters & physics objects.
* for creating localized areas with their own gravity and effecting all items inside that area. 
( ex: you could create a room where if you shoot out the window the room becomes a vacuum and the 
  gravity is greatly reduced until you get to a gui to close a shutter. )
* Allow walking on walls.


You are free to use this code in any Doom3 mod, just please include my readme files.


New Commands:
setgravity x y z playerToo
	eg: setgravity 0 0 1066 1

Test map: gravtest.map

Scripting Events:
becomeActive()
becomeInactive()
setGravity( idVec3 ) ie 0 0 1066 - Not actually tested this yet.




