Difference between revisions of "Fieldname"
From WolfWiki
(trajectory, pedantry for vec3, category) |
m (sess* note) |
||
| Line 125: | Line 125: | ||
</td> | </td> | ||
</table> | </table> | ||
| + | |||
| + | :''note'': all the sess.* fields will return nil unless the entity is associated with client slot < sv_maxclients. | ||
'''ET variable types''': | '''ET variable types''': | ||
Revision as of 06:12, 20 November 2005
List of fields supported by et.gentity_get() and et.gentity_set()
|
- note: all the sess.* fields will return nil unless the entity is associated with client slot < sv_maxclients.
ET variable types:
vec3 : a vec3 is a 3-element array of numbers (C definition: typedef float vec3_t[3];
). It is usually used to store and process coordinates in 3D space.
In etpro-lua a vector is an array (table indexed by integers) containing 3 numbers. It can be accessed by
doing:
origin = et.gentity_get(entNum,"r.currentOrigin") --a vec3 value x,y,z = origin[1],origin[2],origin[3]
trajectory: a trajectory is returned as a lua table described below
{
trDuration = <number>, --- int
trTime = <number>, -- int
trType = <number>, -- see below for allowed values
trBase { -- this is a vec3, as described above
[1] = <number>
[2] = <number>
[3] = <number>
},
trDelta { -- also a vec3
[1] = <number>
[2] = <number>
[3] = <number>
},
}
- the allowed values for trType (along with the enum names and original comments from the ET source), are as follows. Note
- that not all values make sense for all entity types
- TR_STATIONARY
- TR_INTERPOLATE // non-parametric, but interpolate between snapshots
- TR_LINEAR
- TR_LINEAR_STOP
- TR_LINEAR_STOP_BACK //----(SA) added. so reverse movement can be different than forward
- TR_SINE // value = base + sin( time / duration ) * delta
- TR_GRAVITY
- TR_GRAVITY_LOW
- TR_GRAVITY_FLOAT // super low grav with no gravity acceleration (floating feathers/fabric/leaves/...)
- TR_GRAVITY_PAUSED //----(SA) has stopped, but will still do a short trace to see if it should be switched back to TR_GRAVITY
- TR_ACCELERATE
- TR_DECCELERATE
- TR_SPLINE
- TR_LINEAR_PATH