(SubgameEntity creator, SubgameEntity newThing)
| 1070 | } |
| 1071 | |
| 1072 | private static void putInFrontOfCreator(SubgameEntity creator, SubgameEntity newThing) { |
| 1073 | float[] location = creator.s.origin; |
| 1074 | float[] offset = {0,0,0}; |
| 1075 | float[] forward = { 0, 0, 0 }; |
| 1076 | Math3D.AngleVectors(creator.s.angles, forward, null, null); |
| 1077 | Math3D.VectorNormalize(forward); |
| 1078 | Math3D.VectorScale(forward, 128, offset); |
| 1079 | Math3D.VectorAdd(location, offset, offset); |
| 1080 | newThing.s.origin = offset; |
| 1081 | newThing.s.angles[Defines.YAW] = creator.s.angles[Defines.YAW]; |
| 1082 | } |
| 1083 | |
| 1084 | /** |
| 1085 | * Makes sense only for point entities |
no test coverage detected