@@ -58,7 +58,7 @@ public OBJMFootprint(IffFieldEncode iop)
58
58
public struct OBJMMotiveDelta
59
59
{
60
60
public int Motive ;
61
- public float TickDelta ; // 30 ticks per minute, 60 ticks per hour
61
+ public float TickDelta ; // 30 ticks per minute, 60 minutes per hour
62
62
public float StopAt ;
63
63
64
64
public OBJMMotiveDelta ( IffFieldEncode iop )
@@ -69,6 +69,31 @@ public OBJMMotiveDelta(IffFieldEncode iop)
69
69
}
70
70
}
71
71
72
+ [ Flags ]
73
+ public enum OBJMInteractionFlags
74
+ {
75
+ AutoFirst = 1 ,
76
+ PushHeadContinuation = 2 ,
77
+ UserInitiated = 4 , // Interaction is not autonomous. Can be 0 for primitive pushed interactions until they actually run.
78
+ CanBeAuto = 8 , // check tree succeeds with param 0 == 1
79
+ // 16: appears on goto work, group meal (push interaction? inherited? custom icon? doesn't show on person to person...)
80
+ Unknown16 = 16 , // Something to do with interaction push
81
+ Completed = 32 ,
82
+ CarryNameOver = 64 ,
83
+ // 128: unknown - when non-active chars get called to meals (or carpool) this flag is set
84
+ Unknown128 = 128 , // Something to do with interaction push
85
+ UserInterrupted = 256 // When the interaction has the X over it.
86
+ }
87
+
88
+ public enum OBJMRoutingState
89
+ {
90
+ None = 0 ,
91
+ Stopped = 3 ,
92
+ Turning = 4 ,
93
+ Accelerating = 6 ,
94
+ Walking = 9
95
+ }
96
+
72
97
public struct OBJMInteraction
73
98
{
74
99
public int UID ;
@@ -80,16 +105,13 @@ public struct OBJMInteraction
80
105
public int Priority ;
81
106
public short ActionTreeID ;
82
107
public float Attenuation ;
108
+ public OBJMInteractionFlags Flags ;
83
109
84
- // 1: unknown
85
- // 2: appears on group meal continuation
86
- // 4: user initiated? also appears for social interactions from other sim, but those use push interaction
87
- // 8: seems to randomly disappear (not on mourn/go here, is on "sit")
88
- // 16: appears on goto work, group meal continuation
89
- // 32: appears when the interaction becomes a "last interaction"?
90
- // 64: appears on goto work
91
- // 256: manually interrupted (not just priority override)
92
- public int Flags ;
110
+ // called to group meal (28, prio 50) 4 + 8 + 16
111
+ // picked up single meal (child) (30)
112
+ // picked up single meal (adult) (158)
113
+ // mama autos to group meal (129)
114
+ // mama picked up group meal (158)
93
115
94
116
public OBJMInteraction ( IffFieldEncode iop )
95
117
{
@@ -114,7 +136,7 @@ public OBJMInteraction(IffFieldEncode iop)
114
136
Priority = iop . ReadInt32 ( ) ;
115
137
ActionTreeID = iop . ReadInt16 ( ) ;
116
138
Attenuation = iop . ReadFloat ( ) ;
117
- Flags = iop . ReadInt32 ( ) ;
139
+ Flags = ( OBJMInteractionFlags ) iop . ReadInt32 ( ) ;
118
140
}
119
141
120
142
public bool IsValid ( )
@@ -176,7 +198,7 @@ public struct OBJMPerson
176
198
public string CarryAnimation ; //
177
199
public string BaseAnimation ; //a2o-standing-loop;-10;1000;70;1000;1;1;1
178
200
179
- public int RoutingState ;
201
+ public OBJMRoutingState RoutingState ;
180
202
public float [ ] FirstFloats ;
181
203
public float [ ] MotiveDataOld ;
182
204
public float [ ] MotiveData ;
@@ -223,13 +245,7 @@ public OBJMPerson(uint version, IffFieldEncode iop)
223
245
CarryAnimation = iop . ReadString ( false ) ; //a2o-rarm-carry-loop;10;0;1000;1000;0;1;1
224
246
BaseAnimation = iop . ReadString ( true ) ; //a2o-standing-loop;-10;1000;525;1000;1;1;1
225
247
226
- RoutingState = iop . ReadInt32 ( ) ;
227
- // Seems to be related to routing
228
- // 9: actively moving to dest?
229
- // 6: accelerating
230
- // 4: turning?
231
- // 3: stopped? this seems to linger when sims go to work
232
- // 0: no movement (maybe resets when scripted animation starts)
248
+ RoutingState = ( OBJMRoutingState ) iop . ReadInt32 ( ) ;
233
249
234
250
FirstFloats = new float [ 9 ] ;
235
251
0 commit comments