OpenArena Message Boards

id Tech 3 => cgame/game/ui => Topic started by: andrewj on December 27, 2009, 10:36:14 PM



Title: func_door_rotating
Post by: andrewj on December 27, 2009, 10:36:14 PM
Here is the code and demo for func_door_rotating

The patch is against openarena-engine-source-0.8.x-10.tar.bz2, but probably would go into stock ioquake3 very easily.

The main trick with func_door_rotating is to have an "origin brush" as part of the door brush(es), which sets the point around which the object rotates.  This brush should have "common/origin" as the texture on all sides.

A new entity field called "rotatorAngle" controls how far (in degrees) the door rotates.  Default is 90.  Making it negative will make the door swing the other way.  Also spawnflags 32 and 64 can be used to make it swing vertically (around X_AXIS for 32, Y_AXIS for 64).

The demo map is oa_dm1, where the door to the quad swings horizontally and the bridge to the yellow armor swings vertically.  Note that it has no vis and no aas for bots.


Title: Re: func_door_rotating
Post by: fromhell on December 28, 2009, 04:46:06 AM
Is it REALLY an engine change? Some mods did this on stock q3 engine...1.27.


Title: Re: func_door_rotating
Post by: andrewj on December 28, 2009, 08:32:34 AM
Only qagame.qvm is changed.


Title: Re: func_door_rotating
Post by: Udi on December 28, 2009, 10:27:42 AM
I think it works great. Can the speed of rotation be changed too? And also can it be made not to hurt the player when someone gets in the way? As I remember in some games the doors could be opened in both direction, always in the opposite direction of the player (the player was always pushing it), so the player won't be knocked back when pulling. I don't know if it's a clever design or a bug, but can that be implemented?


Title: Re: func_door_rotating
Post by: Cacatoes on December 28, 2009, 10:28:12 AM
A small video here : http://download.tuxfamily.org/openarena/files/videos/openarena-rotating_doors.ogg ;)

I was trying kdenlive so exported that as a try.


Title: Re: func_door_rotating
Post by: fromhell on December 28, 2009, 12:13:44 PM
14fps and the game looks THAT UGLY!!?!? WOW YOU NEED AN UPGRADE FROM YOUR PENTIUM 200 JESUS CHRIST its almost 2010 and you're playing like it's 1998

ahem, usually the 'speed' value in the entity could change the rotspeed. HAlflife had annoying double hinged doors and I would desire support for that and have an optional spawnflag for it.


Title: Re: func_door_rotating
Post by: Cacatoes on December 28, 2009, 02:00:58 PM
[offtopic]When you record with the /video command the FPS drop is normal.

Now it's not like I was complaining about anything, I bought that notebook with opensource drivers on purpose.[/offtopic]


Title: Re: func_door_rotating
Post by: andrewj on December 28, 2009, 09:44:59 PM
Speed, damage, and opening mode (touch or shoot) should all work the same as normal doors.

Double doors should work using normal Q3 entity teaming (i.e. give both sides a "team" "xxx" entity field).


Title: Re: func_door_rotating
Post by: Falkland on December 29, 2009, 11:10:44 AM
As I remember in some games the doors could be opened in both direction, always in the opposite direction of the player (the player was always pushing it), so the player won't be knocked back when pulling. I don't know if it's a clever design or a bug, but can that be implemented?

It is so also in UrT.

Anyway , is this function properly suitable for OA ? Just notice that the gameplay is generally fast while rotating is significantly slower.


Title: Re: func_door_rotating
Post by: fromhell on December 29, 2009, 11:17:11 AM
Whether it's for OA or not dosen't matter. This subforum retains to programming for id Tech 3 in general, since the coding scene has been greatly disjointed and this forum is a weak attempt at reunion, without bias for ioq3, promode, etc.