Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
keyframe.qh File Reference
#include "animation.qh"
Include dependency graph for keyframe.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Keyframe

Functions

float getNewChildDuration (entity, float)
float getNewChildStart (entity)
float getNewChildValue (entity)
entity makeHostedKeyframe (entity, void(entity, float), float, float, float)
entity makeKeyframe (entity, void(entity, float), float, float, float)

Function Documentation

◆ getNewChildDuration()

float getNewChildDuration ( entity this,
float durationTime )

Definition at line 37 of file keyframe.qc.

38 {
39 float maxDura = this.duration;
40 if (this.lastChild) maxDura = maxDura - (this.lastChild.startTime + this.lastChild.duration);
41 float dura = durationTime;
42 if (0 >= dura || dura > maxDura) dura = maxDura;
43 return dura;
44 }

References entity().

Referenced by Keyframe::addEasing().

◆ getNewChildStart()

float getNewChildStart ( entity this)

Definition at line 31 of file keyframe.qc.

32 {
33 if (this.lastChild) return this.lastChild.startTime + this.lastChild.duration;
34 else return 0;
35 }

References entity().

Referenced by Keyframe::addEasing().

◆ getNewChildValue()

float getNewChildValue ( entity this)

Definition at line 46 of file keyframe.qc.

47 {
48 if (this.lastChild) return this.lastChild.startValue + this.lastChild.delta;
49 else return this.startValue;
50 }

References entity().

Referenced by Keyframe::addEasing().

◆ makeHostedKeyframe()

entity makeHostedKeyframe ( entity obj,
void(entity, float) objSetter,
float animDuration,
float animStart,
float animEnd )

Definition at line 10 of file keyframe.qc.

11 {
12 entity this = makeKeyframe(obj, objSetter, animDuration, animStart, animEnd);
13 anim.addAnim(anim, this);
14 return this;
15 }
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity makeKeyframe(entity obj, void(entity, float) objSetter, float animDuration, float animStart, float animEnd)
Definition keyframe.qc:17
entity anim
Definition menu.qh:25

References anim, entity(), and makeKeyframe().

◆ makeKeyframe()

entity makeKeyframe ( entity obj,
void(entity, float) objSetter,
float animDuration,
float animStart,
float animEnd )

Definition at line 17 of file keyframe.qc.

18 {
19 entity this = NEW(Keyframe);
20 this.configureAnimation(this, obj, objSetter, time, animDuration, animStart, animEnd);
21 return this;
22 }
float time
#define NEW(cname,...)
Definition oo.qh:117

References entity(), NEW, and time.

Referenced by makeHostedKeyframe().