You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
557 B
Go

package ent
import (
"github.com/jordanorelli/hyperstone/bit"
)
func qAngleType(spec *typeSpec, env *Env) tÿpe {
if spec.typeName != "QAngle" {
return nil
}
switch spec.bits {
case 0:
8 years ago
Debug.Printf(" qangle type")
return typeFn(func(r bit.Reader) (value, error) {
x, y, z := bit.ReadBool(r), bit.ReadBool(r), bit.ReadBool(r)
var v vector
if x {
v.x = bit.ReadCoord(r)
}
if y {
v.y = bit.ReadCoord(r)
}
if z {
v.z = bit.ReadCoord(r)
}
return v, nil
})
case 32:
return nil
default:
return nil
}
}