Subversion Repositories eduke32

Rev

Rev 5196 | Rev 5202 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5196 hendricks2 1
//-------------------------------------------------------------------------
2
/*
3
Copyright (C) 1997, 2005 - 3D Realms Entertainment
4
 
5
This file is part of Shadow Warrior version 1.2
6
 
7
Shadow Warrior is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License
9
as published by the Free Software Foundation; either version 2
10
of the License, or (at your option) any later version.
11
 
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
 
16
See the GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21
 
22
Original Source: 1997 - Frank Maddin and Jim Norwood
23
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
24
*/
25
//-------------------------------------------------------------------------
26
#include "build.h"
27
 
28
#include "keys.h"
29
#include "names2.h"
30
#include "panel.h"
31
#include "game.h"
32
#include "tags.h"
33
#include "ai.h"
34
#include "pal.h"
35
#include "sprite.h"
36
#include "actor.h"
37
#include "weapon.h"
38
#include "track.h"
39
 
40
short Bunny_Count = 0;
41
ANIMATOR DoActorMoveJump;
42
ANIMATOR DoBunnyMoveJump;
43
ANIMATOR DoBunnyQuickJump;
44
 
45
DECISION BunnyBattle[] =
46
{
47
    {748, InitActorMoveCloser},
48
    {750, InitActorAlertNoise},
49
    {760, InitActorAttackNoise},
50
    {1024, InitActorMoveCloser}
51
};
52
 
53
DECISION BunnyOffense[] =
54
{
55
    {600, InitActorMoveCloser},
56
    {700, InitActorAlertNoise},
57
    {1024, InitActorMoveCloser}
58
};
59
 
60
DECISION BunnyBroadcast[] =
61
{
62
    {21, InitActorAlertNoise},
63
    {51, InitActorAmbientNoise},
64
    {1024, InitActorDecide}
65
};
66
 
67
DECISION BunnySurprised[] =
68
{
69
    {500, InitActorRunAway},
70
    {701, InitActorMoveCloser},
71
    {1024, InitActorDecide}
72
};
73
 
74
DECISION BunnyEvasive[] =
75
{
76
    {500,  InitActorWanderAround},
77
    {1020, InitActorRunAway},
78
    {1024, InitActorAmbientNoise}
79
};
80
 
81
DECISION BunnyLostTarget[] =
82
{
83
    {900, InitActorFindPlayer},
84
    {1024, InitActorWanderAround}
85
};
86
 
87
DECISION BunnyCloseRange[] =
88
{
89
    {1024,  InitActorAttack             },
90
//    {1024,  InitActorReposition         }
91
};
92
 
93
DECISION BunnyWander[] =
94
{
95
    {1024, InitActorReposition}
96
};
97
 
98
PERSONALITY WhiteBunnyPersonality =
99
{
100
    BunnyBattle,
101
    BunnyOffense,
102
    BunnyBroadcast,
103
    BunnySurprised,
104
    BunnyEvasive,
105
    BunnyLostTarget,
106
    BunnyCloseRange,
107
    BunnyCloseRange
108
};
109
 
110
PERSONALITY BunnyPersonality =
111
{
112
    BunnyEvasive,
113
    BunnyEvasive,
114
    BunnyEvasive,
115
    BunnyWander,
116
    BunnyWander,
117
    BunnyWander,
118
    BunnyEvasive,
119
    BunnyEvasive
120
};
121
 
122
ATTRIBUTE BunnyAttrib =
123
{
124
    {100, 120, 140, 180},               // Speeds
125
    {5, 0, -2, -4},                     // Tic Adjusts
126
    3,                                  // MaxWeapons;
127
    {
128
        DIGI_BUNNYAMBIENT, 0, DIGI_BUNNYATTACK,
129
        DIGI_BUNNYATTACK, DIGI_BUNNYDIE2, 0,
130
        0,0,0,0
131
    }
132
};
133
 
134
ATTRIBUTE WhiteBunnyAttrib =
135
{
136
    {200, 220, 340, 380},               // Speeds
137
    {5, 0, -2, -4},                     // Tic Adjusts
138
    3,                                  // MaxWeapons;
139
    {
140
        DIGI_BUNNYAMBIENT, 0, DIGI_BUNNYATTACK,
141
        DIGI_BUNNYATTACK, DIGI_BUNNYDIE2, 0,
142
        0,0,0,0
143
    }
144
};
145
 
146
//////////////////////
147
//
148
// BUNNY RUN
149
//
150
//////////////////////
151
 
152
#define BUNNY_RUN_RATE 10
153
 
154
ANIMATOR DoBunnyMove, NullBunny, DoActorDebris, DoBunnyGrowUp;
155
 
156
STATE s_BunnyRun[5][6] =
157
{
158
    {
159
        {BUNNY_RUN_R0 + 0, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[0][1]},
160
        {BUNNY_RUN_R0 + 1, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[0][2]},
161
        {BUNNY_RUN_R0 + 2, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[0][3]},
162
        {BUNNY_RUN_R0 + 3, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[0][4]},
163
        {BUNNY_RUN_R0 + 4, SF_QUICK_CALL,                DoBunnyGrowUp, &s_BunnyRun[0][5]},
164
        {BUNNY_RUN_R0 + 4, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[0][0]},
165
    },
166
    {
167
        {BUNNY_RUN_R1 + 0, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[1][1]},
168
        {BUNNY_RUN_R1 + 1, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[1][2]},
169
        {BUNNY_RUN_R1 + 2, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[1][3]},
170
        {BUNNY_RUN_R1 + 3, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[1][4]},
171
        {BUNNY_RUN_R1 + 4, SF_QUICK_CALL,                DoBunnyGrowUp, &s_BunnyRun[1][5]},
172
        {BUNNY_RUN_R1 + 4, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[1][0]},
173
    },
174
    {
175
        {BUNNY_RUN_R2 + 0, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[2][1]},
176
        {BUNNY_RUN_R2 + 1, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[2][2]},
177
        {BUNNY_RUN_R2 + 2, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[2][3]},
178
        {BUNNY_RUN_R2 + 3, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[2][4]},
179
        {BUNNY_RUN_R2 + 4, SF_QUICK_CALL,                DoBunnyGrowUp, &s_BunnyRun[2][5]},
180
        {BUNNY_RUN_R2 + 4, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[2][0]},
181
    },
182
    {
183
        {BUNNY_RUN_R3 + 0, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[3][1]},
184
        {BUNNY_RUN_R3 + 1, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[3][2]},
185
        {BUNNY_RUN_R3 + 2, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[3][3]},
186
        {BUNNY_RUN_R3 + 3, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[3][4]},
187
        {BUNNY_RUN_R3 + 4, SF_QUICK_CALL,                DoBunnyGrowUp, &s_BunnyRun[3][5]},
188
        {BUNNY_RUN_R3 + 4, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[3][0]},
189
    },
190
    {
191
        {BUNNY_RUN_R4 + 0, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[4][1]},
192
        {BUNNY_RUN_R4 + 1, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[4][2]},
193
        {BUNNY_RUN_R4 + 2, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[4][3]},
194
        {BUNNY_RUN_R4 + 3, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[4][4]},
195
        {BUNNY_RUN_R4 + 4, SF_QUICK_CALL,                DoBunnyGrowUp, &s_BunnyRun[4][5]},
196
        {BUNNY_RUN_R4 + 4, BUNNY_RUN_RATE | SF_TIC_ADJUST, DoBunnyMove, &s_BunnyRun[4][0]},
197
    }
198
};
199
 
200
 
201
STATEp sg_BunnyRun[] =
202
{
203
    &s_BunnyRun[0][0],
204
    &s_BunnyRun[1][0],
205
    &s_BunnyRun[2][0],
206
    &s_BunnyRun[3][0],
207
    &s_BunnyRun[4][0]
208
};
209
 
210
//////////////////////
211
//
212
// BUNNY STAND
213
//
214
//////////////////////
215
 
216
#define BUNNY_STAND_RATE 12
217
ANIMATOR DoBunnyEat;
218
 
219
STATE s_BunnyStand[5][3] =
220
{
221
    {
222
        {BUNNY_STAND_R0 + 0, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[0][1]},
223
        {BUNNY_STAND_R0 + 4, SF_QUICK_CALL, DoBunnyGrowUp, &s_BunnyStand[0][2]},
224
        {BUNNY_STAND_R0 + 4, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[0][0]},
225
    },
226
    {
227
        {BUNNY_STAND_R1 + 0, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[1][1]},
228
        {BUNNY_STAND_R1 + 4, SF_QUICK_CALL, DoBunnyGrowUp, &s_BunnyStand[1][2]},
229
        {BUNNY_STAND_R1 + 4, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[1][0]},
230
    },
231
    {
232
        {BUNNY_STAND_R2 + 0, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[2][1]},
233
        {BUNNY_STAND_R2 + 4, SF_QUICK_CALL, DoBunnyGrowUp, &s_BunnyStand[2][2]},
234
        {BUNNY_STAND_R2 + 4, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[2][0]},
235
    },
236
    {
237
        {BUNNY_STAND_R3 + 0, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[3][1]},
238
        {BUNNY_STAND_R3 + 4, SF_QUICK_CALL, DoBunnyGrowUp, &s_BunnyStand[3][2]},
239
        {BUNNY_STAND_R3 + 4, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[3][0]},
240
    },
241
    {
242
        {BUNNY_STAND_R4 + 0, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[4][1]},
243
        {BUNNY_STAND_R4 + 4, SF_QUICK_CALL, DoBunnyGrowUp, &s_BunnyStand[4][2]},
244
        {BUNNY_STAND_R4 + 4, BUNNY_STAND_RATE, DoBunnyEat, &s_BunnyStand[4][0]},
245
    },
246
};
247
 
248
 
249
STATEp sg_BunnyStand[] =
250
{
251
    s_BunnyStand[0],
252
    s_BunnyStand[1],
253
    s_BunnyStand[2],
254
    s_BunnyStand[3],
255
    s_BunnyStand[4]
256
};
257
 
258
//////////////////////
259
//
260
// BUNNY GET LAYED
261
//
262
//////////////////////
263
 
264
#define BUNNY_SCREW_RATE 16
265
ANIMATOR DoBunnyScrew;
266
 
267
STATE s_BunnyScrew[5][2] =
268
{
269
    {
270
        {BUNNY_STAND_R0 + 0, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[0][1]},
271
        {BUNNY_STAND_R0 + 2, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[0][0]},
272
    },
273
    {
274
        {BUNNY_STAND_R1 + 0, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[1][1]},
275
        {BUNNY_STAND_R1 + 2, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[1][0]},
276
    },
277
    {
278
        {BUNNY_STAND_R2 + 0, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[2][1]},
279
        {BUNNY_STAND_R2 + 2, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[2][0]},
280
    },
281
    {
282
        {BUNNY_STAND_R3 + 0, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[3][1]},
283
        {BUNNY_STAND_R3 + 2, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[3][0]},
284
    },
285
    {
286
        {BUNNY_STAND_R4 + 0, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[4][1]},
287
        {BUNNY_STAND_R4 + 2, BUNNY_SCREW_RATE, DoBunnyScrew, &s_BunnyScrew[4][0]},
288
    },
289
};
290
 
291
 
292
STATEp sg_BunnyScrew[] =
293
{
294
    s_BunnyScrew[0],
295
    s_BunnyScrew[1],
296
    s_BunnyScrew[2],
297
    s_BunnyScrew[3],
298
    s_BunnyScrew[4]
299
};
300
 
301
//////////////////////
302
//
303
// BUNNY SWIPE
304
//
305
//////////////////////
306
 
307
#define BUNNY_SWIPE_RATE 8
308
ANIMATOR InitActorDecide;
309
ANIMATOR InitBunnySlash;
310
 
311
STATE s_BunnySwipe[5][8] =
312
{
313
    {
314
        {BUNNY_SWIPE_R0 + 0, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[0][1]},
315
        {BUNNY_SWIPE_R0 + 1, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[0][2]},
316
        {BUNNY_SWIPE_R0 + 1, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[0][3]},
317
        {BUNNY_SWIPE_R0 + 2, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[0][4]},
318
        {BUNNY_SWIPE_R0 + 3, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[0][5]},
319
        {BUNNY_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[0][6]},
320
        {BUNNY_SWIPE_R0 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_BunnySwipe[0][7]},
321
        {BUNNY_SWIPE_R0 + 3, BUNNY_SWIPE_RATE, DoBunnyMove, &s_BunnySwipe[0][7]},
322
    },
323
    {
324
        {BUNNY_SWIPE_R1 + 0, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[1][1]},
325
        {BUNNY_SWIPE_R1 + 1, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[1][2]},
326
        {BUNNY_SWIPE_R1 + 1, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[1][3]},
327
        {BUNNY_SWIPE_R1 + 2, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[1][4]},
328
        {BUNNY_SWIPE_R1 + 3, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[1][5]},
329
        {BUNNY_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[1][6]},
330
        {BUNNY_SWIPE_R1 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_BunnySwipe[1][7]},
331
        {BUNNY_SWIPE_R1 + 3, BUNNY_SWIPE_RATE, DoBunnyMove, &s_BunnySwipe[1][7]},
332
    },
333
    {
334
        {BUNNY_SWIPE_R2 + 0, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[2][1]},
335
        {BUNNY_SWIPE_R2 + 1, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[2][2]},
336
        {BUNNY_SWIPE_R2 + 1, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[2][3]},
337
        {BUNNY_SWIPE_R2 + 2, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[2][4]},
338
        {BUNNY_SWIPE_R2 + 3, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[2][5]},
339
        {BUNNY_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[2][6]},
340
        {BUNNY_SWIPE_R2 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_BunnySwipe[2][7]},
341
        {BUNNY_SWIPE_R2 + 3, BUNNY_SWIPE_RATE, DoBunnyMove, &s_BunnySwipe[2][7]},
342
    },
343
    {
344
        {BUNNY_SWIPE_R3 + 0, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[3][1]},
345
        {BUNNY_SWIPE_R3 + 1, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[3][2]},
346
        {BUNNY_SWIPE_R3 + 1, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[3][3]},
347
        {BUNNY_SWIPE_R3 + 2, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[3][4]},
348
        {BUNNY_SWIPE_R3 + 3, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[3][5]},
349
        {BUNNY_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[3][6]},
350
        {BUNNY_SWIPE_R3 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_BunnySwipe[3][7]},
351
        {BUNNY_SWIPE_R3 + 3, BUNNY_SWIPE_RATE, DoBunnyMove, &s_BunnySwipe[3][7]},
352
    },
353
    {
354
        {BUNNY_SWIPE_R4 + 0, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[4][1]},
355
        {BUNNY_SWIPE_R4 + 1, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[4][2]},
356
        {BUNNY_SWIPE_R4 + 1, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[4][3]},
357
        {BUNNY_SWIPE_R4 + 2, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[4][4]},
358
        {BUNNY_SWIPE_R4 + 3, BUNNY_SWIPE_RATE, NullBunny, &s_BunnySwipe[4][5]},
359
        {BUNNY_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitBunnySlash, &s_BunnySwipe[4][6]},
360
        {BUNNY_SWIPE_R4 + 3, 0 | SF_QUICK_CALL, InitActorDecide, &s_BunnySwipe[4][7]},
361
        {BUNNY_SWIPE_R4 + 3, BUNNY_SWIPE_RATE, DoBunnyMove, &s_BunnySwipe[4][7]},
362
    }
363
};
364
 
365
 
366
STATEp sg_BunnySwipe[] =
367
{
368
    &s_BunnySwipe[0][0],
369
    &s_BunnySwipe[1][0],
370
    &s_BunnySwipe[2][0],
371
    &s_BunnySwipe[3][0],
372
    &s_BunnySwipe[4][0]
373
};
374
 
375
 
376
//////////////////////
377
//
378
// BUNNY HEART - show players heart
379
//
380
//////////////////////
381
 
382
#define BUNNY_HEART_RATE 14
383
ANIMATOR DoBunnyStandKill;
384
 
385
STATE s_BunnyHeart[5][4] =
386
{
387
    {
388
        {BUNNY_SWIPE_R0 + 0, BUNNY_HEART_RATE, DoBunnyStandKill, &s_BunnyHeart[0][0]},
389
    },
390
    {
391
        {BUNNY_SWIPE_R1 + 0, BUNNY_HEART_RATE, DoBunnyStandKill, &s_BunnyHeart[1][0]},
392
    },
393
    {
394
        {BUNNY_SWIPE_R2 + 0, BUNNY_HEART_RATE, DoBunnyStandKill, &s_BunnyHeart[2][0]},
395
    },
396
    {
397
        {BUNNY_SWIPE_R3 + 0, BUNNY_HEART_RATE, DoBunnyStandKill, &s_BunnyHeart[3][0]},
398
    },
399
    {
400
        {BUNNY_SWIPE_R4 + 0, BUNNY_HEART_RATE, DoBunnyStandKill, &s_BunnyHeart[4][0]},
401
    }
402
};
403
 
404
 
405
STATEp sg_BunnyHeart[] =
406
{
407
    &s_BunnyHeart[0][0],
408
    &s_BunnyHeart[1][0],
409
    &s_BunnyHeart[2][0],
410
    &s_BunnyHeart[3][0],
411
    &s_BunnyHeart[4][0]
412
};
413
 
414
//////////////////////
415
//
416
// BUNNY PAIN
417
//
418
//////////////////////
419
 
420
#define BUNNY_PAIN_RATE 38
421
ANIMATOR DoBunnyPain;
422
 
423
STATE s_BunnyPain[5][1] =
424
{
425
    {
426
        {BUNNY_SWIPE_R0 + 0, BUNNY_PAIN_RATE, DoBunnyPain, &s_BunnyPain[0][0]},
427
    },
428
    {
429
        {BUNNY_SWIPE_R0 + 0, BUNNY_PAIN_RATE, DoBunnyPain, &s_BunnyPain[1][0]},
430
    },
431
    {
432
        {BUNNY_SWIPE_R0 + 0, BUNNY_PAIN_RATE, DoBunnyPain, &s_BunnyPain[2][0]},
433
    },
434
    {
435
        {BUNNY_SWIPE_R0 + 0, BUNNY_PAIN_RATE, DoBunnyPain, &s_BunnyPain[3][0]},
436
    },
437
    {
438
        {BUNNY_SWIPE_R0 + 0, BUNNY_PAIN_RATE, DoBunnyPain, &s_BunnyPain[4][0]},
439
    }
440
};
441
 
442
STATEp sg_BunnyPain[] =
443
{
444
    &s_BunnyPain[0][0],
445
    &s_BunnyPain[1][0],
446
    &s_BunnyPain[2][0],
447
    &s_BunnyPain[3][0],
448
    &s_BunnyPain[4][0]
449
};
450
 
451
//////////////////////
452
//
453
// BUNNY JUMP
454
//
455
//////////////////////
456
 
457
#define BUNNY_JUMP_RATE 25
458
 
459
STATE s_BunnyJump[5][6] =
460
{
461
    {
462
        {BUNNY_RUN_R0 + 1, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[0][1]},
463
        {BUNNY_RUN_R0 + 2, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[0][1]},
464
    },
465
    {
466
        {BUNNY_RUN_R1 + 1, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[1][1]},
467
        {BUNNY_RUN_R1 + 2, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[1][1]},
468
    },
469
    {
470
        {BUNNY_RUN_R2 + 1, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[2][1]},
471
        {BUNNY_RUN_R2 + 2, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[2][1]},
472
    },
473
    {
474
        {BUNNY_RUN_R3 + 1, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[3][1]},
475
        {BUNNY_RUN_R3 + 2, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[3][1]},
476
    },
477
    {
478
        {BUNNY_RUN_R4 + 1, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[4][1]},
479
        {BUNNY_RUN_R4 + 2, BUNNY_JUMP_RATE, DoBunnyMoveJump, &s_BunnyJump[4][1]},
480
    }
481
};
482
 
483
 
484
STATEp sg_BunnyJump[] =
485
{
486
    &s_BunnyJump[0][0],
487
    &s_BunnyJump[1][0],
488
    &s_BunnyJump[2][0],
489
    &s_BunnyJump[3][0],
490
    &s_BunnyJump[4][0]
491
};
492
 
493
 
494
//////////////////////
495
//
496
// BUNNY FALL
497
//
498
//////////////////////
499
 
500
#define BUNNY_FALL_RATE 25
501
 
502
STATE s_BunnyFall[5][6] =
503
{
504
    {
505
        {BUNNY_RUN_R0 + 3, BUNNY_FALL_RATE, DoBunnyMoveJump, &s_BunnyFall[0][0]},
506
    },
507
    {
508
        {BUNNY_RUN_R1 + 3, BUNNY_FALL_RATE, DoBunnyMoveJump, &s_BunnyFall[1][0]},
509
    },
510
    {
511
        {BUNNY_RUN_R2 + 3, BUNNY_FALL_RATE, DoBunnyMoveJump, &s_BunnyFall[2][0]},
512
    },
513
    {
514
        {BUNNY_RUN_R3 + 3, BUNNY_FALL_RATE, DoBunnyMoveJump, &s_BunnyFall[3][0]},
515
    },
516
    {
517
        {BUNNY_RUN_R4 + 3, BUNNY_FALL_RATE, DoBunnyMoveJump, &s_BunnyFall[4][0]},
518
    }
519
};
520
 
521
 
522
STATEp sg_BunnyFall[] =
523
{
524
    &s_BunnyFall[0][0],
525
    &s_BunnyFall[1][0],
526
    &s_BunnyFall[2][0],
527
    &s_BunnyFall[3][0],
528
    &s_BunnyFall[4][0]
529
};
530
 
531
 
532
//////////////////////
533
//
534
// BUNNY JUMP ATTACK
535
//
536
//////////////////////
537
 
538
#define BUNNY_JUMP_ATTACK_RATE 35
539
int DoBunnyBeginJumpAttack(short SpriteNum);
540
 
541
STATE s_BunnyJumpAttack[5][6] =
542
{
543
    {
544
        {BUNNY_RUN_R0 + 1, BUNNY_JUMP_ATTACK_RATE, NullBunny, &s_BunnyJumpAttack[0][1]},
545
        {BUNNY_RUN_R0 + 1, 0 | SF_QUICK_CALL, DoBunnyBeginJumpAttack, &s_BunnyJumpAttack[0][2]},
546
        {BUNNY_RUN_R0 + 2, BUNNY_JUMP_ATTACK_RATE, DoBunnyMoveJump, &s_BunnyJumpAttack[0][2]},
547
    },
548
    {
549
        {BUNNY_RUN_R1 + 1, BUNNY_JUMP_ATTACK_RATE, NullBunny, &s_BunnyJumpAttack[1][1]},
550
        {BUNNY_RUN_R1 + 1, 0 | SF_QUICK_CALL, DoBunnyBeginJumpAttack, &s_BunnyJumpAttack[1][2]},
551
        {BUNNY_RUN_R1 + 2, BUNNY_JUMP_ATTACK_RATE, DoBunnyMoveJump, &s_BunnyJumpAttack[1][2]},
552
    },
553
    {
554
        {BUNNY_RUN_R2 + 1, BUNNY_JUMP_ATTACK_RATE, NullBunny, &s_BunnyJumpAttack[2][1]},
555
        {BUNNY_RUN_R2 + 1, 0 | SF_QUICK_CALL, DoBunnyBeginJumpAttack, &s_BunnyJumpAttack[2][2]},
556
        {BUNNY_RUN_R2 + 2, BUNNY_JUMP_ATTACK_RATE, DoBunnyMoveJump, &s_BunnyJumpAttack[2][2]},
557
    },
558
    {
559
        {BUNNY_RUN_R3 + 1, BUNNY_JUMP_ATTACK_RATE, NullBunny, &s_BunnyJumpAttack[3][1]},
560
        {BUNNY_RUN_R3 + 1, 0 | SF_QUICK_CALL, DoBunnyBeginJumpAttack, &s_BunnyJumpAttack[3][2]},
561
        {BUNNY_RUN_R3 + 2, BUNNY_JUMP_ATTACK_RATE, DoBunnyMoveJump, &s_BunnyJumpAttack[3][2]},
562
    },
563
    {
564
        {BUNNY_RUN_R4 + 1, BUNNY_JUMP_ATTACK_RATE, NullBunny, &s_BunnyJumpAttack[4][1]},
565
        {BUNNY_RUN_R4 + 1, 0 | SF_QUICK_CALL, DoBunnyBeginJumpAttack, &s_BunnyJumpAttack[4][2]},
566
        {BUNNY_RUN_R4 + 2, BUNNY_JUMP_ATTACK_RATE, DoBunnyMoveJump, &s_BunnyJumpAttack[4][2]},
567
    }
568
};
569
 
570
 
571
STATEp sg_BunnyJumpAttack[] =
572
{
573
    &s_BunnyJumpAttack[0][0],
574
    &s_BunnyJumpAttack[1][0],
575
    &s_BunnyJumpAttack[2][0],
576
    &s_BunnyJumpAttack[3][0],
577
    &s_BunnyJumpAttack[4][0]
578
};
579
 
580
 
581
//////////////////////
582
//
583
// BUNNY DIE
584
//
585
//////////////////////
586
 
587
#define BUNNY_DIE_RATE 16
588
ANIMATOR BunnySpew;
589
 
590
STATE s_BunnyDie[] =
591
{
592
    {BUNNY_DIE + 0, BUNNY_DIE_RATE, NullBunny, &s_BunnyDie[1]},
593
    {BUNNY_DIE + 0, SF_QUICK_CALL,  BunnySpew, &s_BunnyDie[2]},
594
    {BUNNY_DIE + 1, BUNNY_DIE_RATE, NullBunny, &s_BunnyDie[3]},
595
    {BUNNY_DIE + 2, BUNNY_DIE_RATE, NullBunny, &s_BunnyDie[4]},
596
    {BUNNY_DIE + 2, BUNNY_DIE_RATE, NullBunny, &s_BunnyDie[5]},
597
    {BUNNY_DEAD, BUNNY_DIE_RATE, DoActorDebris, &s_BunnyDie[5]},
598
};
599
 
600
#define BUNNY_DEAD_RATE 8
601
 
602
STATE s_BunnyDead[] =
603
{
604
    {BUNNY_DIE + 0, BUNNY_DEAD_RATE, NullAnimator, &s_BunnyDie[1]},
605
    {BUNNY_DIE + 0, SF_QUICK_CALL,  BunnySpew, &s_BunnyDie[2]},
606
    {BUNNY_DIE + 1, BUNNY_DEAD_RATE, NullAnimator, &s_BunnyDead[3]},
607
    {BUNNY_DIE + 2, BUNNY_DEAD_RATE, NullAnimator, &s_BunnyDead[4]},
608
    {BUNNY_DEAD, SF_QUICK_CALL, QueueFloorBlood, &s_BunnyDead[5]},
609
    {BUNNY_DEAD, BUNNY_DEAD_RATE, DoActorDebris, &s_BunnyDead[5]},
610
};
611
 
612
STATEp sg_BunnyDie[] =
613
{
614
    s_BunnyDie
615
};
616
 
617
STATEp sg_BunnyDead[] =
618
{
619
    s_BunnyDead
620
};
621
 
622
STATE s_BunnyDeathJump[] =
623
{
624
    {BUNNY_DIE + 0, BUNNY_DIE_RATE, DoActorDeathMove, &s_BunnyDeathJump[0]}
625
};
626
 
627
STATE s_BunnyDeathFall[] =
628
{
629
    {BUNNY_DIE + 1, BUNNY_DIE_RATE, DoActorDeathMove, &s_BunnyDeathFall[0]}
630
};
631
 
632
STATEp sg_BunnyDeathJump[] =
633
{
634
    s_BunnyDeathJump
635
};
636
 
637
STATEp sg_BunnyDeathFall[] =
638
{
639
    s_BunnyDeathFall
640
};
641
 
642
 
643
/*
644
STATEp *Stand[MAX_WEAPONS];
645
STATEp *Run;
646
STATEp *Jump;
647
STATEp *Fall;
648
STATEp *Crawl;
649
STATEp *Swim;
650
STATEp *Fly;
651
STATEp *Rise;
652
STATEp *Sit;
653
STATEp *Look;
654
STATEp *Climb;
655
STATEp *Pain;
656
STATEp *Death1;
657
STATEp *Death2;
658
STATEp *Dead;
659
STATEp *DeathJump;
660
STATEp *DeathFall;
661
STATEp *CloseAttack[2];
662
STATEp *Attack[6];
663
STATEp *Special[2];
664
*/
665
 
666
ACTOR_ACTION_SET BunnyActionSet =
667
{
668
    sg_BunnyStand,
669
    sg_BunnyRun,
670
    sg_BunnyJump,
671
    sg_BunnyFall,
672
    NULL,                               // sg_BunnyCrawl,
673
    NULL,                               // sg_BunnySwim,
674
    NULL,                               // sg_BunnyFly,
675
    NULL,                               // sg_BunnyRise,
676
    NULL,                               // sg_BunnySit,
677
    NULL,                               // sg_BunnyLook,
678
    NULL,                               // climb
679
    sg_BunnyPain,
680
    sg_BunnyDie,
681
    NULL,
682
    sg_BunnyDead,
683
    sg_BunnyDeathJump,
684
    sg_BunnyDeathFall,
685
    {NULL},
686
    {1024},
687
    {NULL},
688
    {1024},
689
    {sg_BunnyHeart, sg_BunnyRun},
690
    NULL,
691
    NULL
692
};
693
 
694
ACTOR_ACTION_SET BunnyWhiteActionSet =
695
{
696
    sg_BunnyStand,
697
    sg_BunnyRun,
698
    sg_BunnyJump,
699
    sg_BunnyFall,
700
    NULL,                               // sg_BunnyCrawl,
701
    NULL,                               // sg_BunnySwim,
702
    NULL,                               // sg_BunnyFly,
703
    NULL,                               // sg_BunnyRise,
704
    NULL,                               // sg_BunnySit,
705
    NULL,                               // sg_BunnyLook,
706
    NULL,                               // climb
707
    sg_BunnyPain,                       // pain
708
    sg_BunnyDie,
709
    NULL,
710
    sg_BunnyDead,
711
    sg_BunnyDeathJump,
712
    sg_BunnyDeathFall,
713
    {sg_BunnySwipe},
714
    {1024},
715
//    {sg_BunnyJumpAttack, sg_BunnySwipe},
716
//    {800, 1024},
717
    {sg_BunnySwipe},
718
    {1024},
719
    {sg_BunnyHeart, sg_BunnySwipe},
720
    NULL,
721
    NULL
722
};
723
 
724
int
725
SetupBunny(short SpriteNum)
726
{
727
    SPRITEp sp = &sprite[SpriteNum];
728
    USERp u;
729
    ANIMATOR DoActorDecide;
730
 
731
    if (TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
732
    {
733
        u = User[SpriteNum];
734
        ASSERT(u);
735
    }
736
    else
737
    {
738
        User[SpriteNum] = u = SpawnUser(SpriteNum, BUNNY_RUN_R0, s_BunnyRun[0]);
739
        u->Health = 10;
740
    }
741
 
742
    Bunny_Count++;
743
    //if(Bunny_Count > 20)
744
    //    {
745
    //    KillSprite(SpriteNum);
746
    //    Bunny_Count--;
747
    //    return(0);
748
    //    }
749
 
750
    ChangeState(SpriteNum, s_BunnyRun[0]);
751
    u->StateEnd = s_BunnyDie;
752
    u->Rot = sg_BunnyRun;
753
    //sp->xrepeat = 64;
754
    //sp->yrepeat = 64;
755
    u->ShellNum = 0; // Not Pregnant right now
756
    u->FlagOwner = 0;
757
 
758
    sp->clipdist = (150) >> 2;
759
 
760
    if (sp->pal == PALETTE_PLAYER1)
761
    {
762
        EnemyDefaults(SpriteNum, &BunnyWhiteActionSet, &WhiteBunnyPersonality);
763
        u->Attrib = &WhiteBunnyAttrib;
764
        sp->xrepeat = 96;
765
        sp->yrepeat = 90;
766
 
767
        sp->clipdist = 200>>2;
768
 
769
        if (!TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
770
            u->Health = 60;
771
    }
772
    else if (sp->pal == PALETTE_PLAYER8) // Male Rabbit
773
    {
774
        EnemyDefaults(SpriteNum, &BunnyActionSet, &BunnyPersonality);
775
        u->Attrib = &BunnyAttrib;
776
        //sp->xrepeat = 76;
777
        //sp->yrepeat = 70;
778
 
779
        //sp->shade = 0; // darker
780
        if (!TEST(sp->cstat, CSTAT_SPRITE_RESTORE))
781
            u->Health = 20;
782
        u->Flag1 = 0;
783
    }
784
    else
785
    {
786
        // Female Rabbit
787
        EnemyDefaults(SpriteNum, &BunnyActionSet, &BunnyPersonality);
788
        u->Attrib = &BunnyAttrib;
789
        u->spal = sp->pal = PALETTE_PLAYER0;
790
        u->Flag1 = SEC(5);
791
        //sp->shade = 0; // darker
792
    }
793
 
794
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
795
 
796
    SET(u->Flags, SPR_XFLIP_TOGGLE);
797
 
798
 
799
    u->zclip = Z(16);
800
    u->floor_dist = Z(8);
801
    u->ceiling_dist = Z(8);
802
    u->lo_step = Z(16);
803
 
804
    return 0;
805
}
806
 
807
int
808
GetBunnyJumpHeight(short jump_speed, short jump_grav)
809
{
810
    int jump_iterations;
811
    int height;
812
 
813
    jump_speed = labs(jump_speed);
814
 
815
    jump_iterations = jump_speed / (jump_grav * ACTORMOVETICS);
816
 
817
    height = jump_speed * jump_iterations * ACTORMOVETICS;
818
 
819
    height = DIV256(height);
820
 
821
    return DIV2(height);
822
}
823
 
824
int
825
PickBunnyJumpSpeed(short SpriteNum, int pix_height)
826
{
827
    SPRITEp sp = &sprite[SpriteNum];
828
    USERp u = User[SpriteNum];
829
 
830
    ASSERT(pix_height < 128);
831
 
832
    u->jump_speed = -600;
833
    u->jump_grav = 8;
834
 
835
    while (TRUE)
836
    {
837
        if (GetBunnyJumpHeight(u->jump_speed, u->jump_grav) > pix_height + 20)
838
            break;
839
 
840
        u->jump_speed -= 100;
841
 
842
        ASSERT(u->jump_speed > -3000);
843
    }
844
 
845
    return u->jump_speed;
846
}
847
 
848
//
849
// JUMP ATTACK
850
//
851
 
852
int
853
DoBunnyBeginJumpAttack(short SpriteNum)
854
{
855
    SPRITEp sp = &sprite[SpriteNum];
856
    USERp u = User[SpriteNum];
857
    SPRITEp psp = User[SpriteNum]->tgt_sp;
858
    int dist;
859
    int CanSeePlayer(short SpriteNum);
860
    short tang;
861
 
862
 
863
#define RANDOM_NEG(x) (RANDOM_P2((x)<<1) - (x))
864
 
865
    tang = getangle(psp->x - sp->x, psp->y - sp->y);
866
 
867
    if (move_sprite(SpriteNum, sintable[NORM_ANGLE(tang+512)] >> 7, sintable[tang] >> 7,
868
                    0L, u->ceiling_dist, u->floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS))
869
        sp->ang = NORM_ANGLE(sp->ang + 1024) + (RANDOM_NEG(256 << 6) >> 6);
870
    else
871
        sp->ang = NORM_ANGLE(tang + (RANDOM_NEG(256 << 6) >> 6));
872
 
873
    DoActorSetSpeed(SpriteNum, FAST_SPEED);
874
 
875
    //u->jump_speed = -800;
876
    PickJumpMaxSpeed(SpriteNum, -400); // was -800
877
 
878
    SET(u->Flags, SPR_JUMPING);
879
    RESET(u->Flags, SPR_FALLING);
880
 
881
    // set up individual actor jump gravity
882
    u->jump_grav = 17; // was 8
883
 
884
    // if I didn't do this here they get stuck in the air sometimes
885
    DoActorZrange(SpriteNum);
886
 
887
    DoJump(SpriteNum);
888
 
889
    return 0;
890
}
891
 
892
int
893
DoBunnyMoveJump(short SpriteNum)
894
{
895
    SPRITEp sp = &sprite[SpriteNum];
896
    USERp u = User[SpriteNum];
897
 
898
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
899
    {
900
        int nx, ny;
901
 
902
        // Move while jumping
903
        nx = sp->xvel * (int) sintable[NORM_ANGLE(sp->ang + 512)] >> 14;
904
        ny = sp->xvel * (int) sintable[sp->ang] >> 14;
905
 
906
        move_actor(SpriteNum, nx, ny, 0L);
907
 
908
        if (TEST(u->Flags, SPR_JUMPING))
909
            DoActorJump(SpriteNum);
910
        else
911
            DoActorFall(SpriteNum);
912
    }
913
 
914
    DoActorZrange(SpriteNum);
915
 
916
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
917
    {
918
//        if (DoBunnyQuickJump(SpriteNum))
919
//            return (0);
920
 
921
        InitActorDecide(SpriteNum);
922
    }
923
 
924
    return 0;
925
}
926
 
927
int
928
DoPickCloseBunny(short SpriteNum)
929
{
930
    USERp u = User[SpriteNum],tu;
931
    SPRITEp sp = &sprite[SpriteNum],tsp;
932
    int dist, near_dist = 1000, a,b,c;
933
    short i, nexti;
934
    //short BunnyCount=0, Bunny_Result = -1;
935
 
936
    // if actor can still see the player
937
    int look_height = SPRITEp_TOS(sp);
5198 hendricks2 938
    SWBOOL ICanSee = FALSE;
5196 hendricks2 939
 
940
    TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti)
941
    {
942
        tsp = &sprite[i];
943
        tu = User[i];
944
 
945
        if (sp == tsp) continue;
946
 
947
        if (tu->ID != BUNNY_RUN_R0) continue;
948
 
949
        DISTANCE(tsp->x, tsp->y, sp->x, sp->y, dist, a, b, c);
950
 
951
        if (dist > near_dist) continue;
952
 
953
        ICanSee = FAFcansee(sp->x, sp->y, look_height, sp->sectnum, tsp->x, tsp->y, SPRITEp_UPPER(tsp), tsp->sectnum);
954
 
955
        if (ICanSee && dist < near_dist && tu->ID == BUNNY_RUN_R0)
956
        {
957
            near_dist = dist;
958
            u->tgt_sp = u->lo_sp = tsp;
959
            //Bunny_Result = i;
960
            return i;
961
        }
962
    }
963
    return -1;
964
}
965
 
966
int
967
DoBunnyQuickJump(short SpriteNum)
968
{
969
    SPRITEp sp = &sprite[SpriteNum];
970
    USERp u = User[SpriteNum];
971
 
972
    if (u->spal != PALETTE_PLAYER8) return FALSE;
973
 
974
    if (!u->lo_sp && u->spal == PALETTE_PLAYER8 && MoveSkip4)
975
        DoPickCloseBunny(SpriteNum);
976
 
977
    // Random Chance of like sexes fighting
978
    if (u->lo_sp)
979
    {
980
        short hitsprite = u->lo_sp - sprite;
981
        SPRITEp tsp = u->lo_sp;
982
        USERp tu = User[hitsprite];
983
 
984
        if (!tu || tu->ID != BUNNY_RUN_R0) return FALSE;
985
 
986
 
987
        // Not mature enough yet
988
        if (sp->xrepeat != 64 || sp->yrepeat != 64) return FALSE;
989
        if (tsp->xrepeat != 64 || tsp->yrepeat != 64) return FALSE;
990
 
991
        // Kill a rival
992
        // Only males fight
993
        if (tu->spal == sp->pal && RANDOM_RANGE(1000) > 995)
994
        {
995
            if (u->spal == PALETTE_PLAYER8 && tu->spal == PALETTE_PLAYER8)
996
            {
997
                PlaySound(DIGI_BUNNYATTACK, &sp->x, &sp->y, &sp->z, v3df_follow);
998
                PlaySound(DIGI_BUNNYDIE2, &tsp->x, &tsp->y, &tsp->z, v3df_follow);
999
                tu->Health = 0;
1000
 
1001
                // Blood fountains
1002
                InitBloodSpray(hitsprite,TRUE,-1);
1003
 
1004
                if (SpawnShrap(hitsprite, SpriteNum))
1005
                {
1006
                    SetSuicide(hitsprite);
1007
                }
1008
                else
1009
                    DoActorDie(hitsprite, SpriteNum);
1010
 
1011
                Bunny_Count--; // Bunny died
1012
 
1013
                u->lo_sp = NULL;
1014
                return TRUE;
1015
            }
1016
        }
1017
    }
1018
 
1019
    // Get layed!
1020
    if (u->lo_sp && u->spal == PALETTE_PLAYER8) // Only males check this
1021
    {
1022
        short hitsprite = u->lo_sp - sprite;
1023
        SPRITEp tsp = u->lo_sp;
1024
        USERp tu = User[hitsprite];
1025
 
1026
 
1027
        if (!tu || tu->ID != BUNNY_RUN_R0) return FALSE;
1028
 
1029
        // Not mature enough to mate yet
1030
        if (sp->xrepeat != 64 || sp->yrepeat != 64) return FALSE;
1031
        if (tsp->xrepeat != 64 || tsp->yrepeat != 64) return FALSE;
1032
 
1033
        if (tu->ShellNum <= 0 && tu->WaitTics <= 0 && u->WaitTics <= 0)
1034
        {
1035
            if (TEST(tsp->extra, SPRX_PLAYER_OR_ENEMY))
1036
            {
1037
                PLAYERp pp = NULL;
1038
 
1039
                if (RANDOM_RANGE(1000) < 995 && tu->spal != PALETTE_PLAYER0) return FALSE;
1040
 
1041
                DoActorPickClosePlayer(SpriteNum);
1042
 
1043
                if (User[u->tgt_sp-sprite]->PlayerP)
1044
                    pp = User[u->tgt_sp-sprite]->PlayerP;
1045
 
1046
                if (tu->spal != PALETTE_PLAYER0)
1047
                {
1048
                    if (tu->Flag1 > 0) return FALSE;
1049
                    tu->FlagOwner = 1; // FAG!
1050
                    tu->Flag1 = SEC(10);
1051
                    if (pp)
1052
                    {
1053
                        short choose_snd;
1054
                        int fagsnds[] = {DIGI_FAGRABBIT1,DIGI_FAGRABBIT2,DIGI_FAGRABBIT3};
1055
 
1056
                        if (pp == Player+myconnectindex)
1057
                        {
1058
                            choose_snd = STD_RANDOM_RANGE(2<<8)>>8;
1059
                            if (FAFcansee(sp->x,sp->y,SPRITEp_TOS(sp),sp->sectnum,pp->posx, pp->posy, pp->posz, pp->cursectnum) && FACING(sp, u->tgt_sp))
1060
                                PlayerSound(fagsnds[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_doppler|v3df_follow|v3df_dontpan,pp);
1061
                        }
1062
                    }
1063
                }
1064
                else
1065
                {
1066
                    if (pp && RANDOM_RANGE(1000) > 200)
1067
                    {
1068
                        short choose_snd;
1069
                        int straightsnds[] = {DIGI_RABBITHUMP1,DIGI_RABBITHUMP2,
1070
                                              DIGI_RABBITHUMP3,DIGI_RABBITHUMP4};
1071
 
1072
                        if (pp == Player+myconnectindex)
1073
                        {
1074
                            choose_snd = STD_RANDOM_RANGE(3<<8)>>8;
1075
                            if (FAFcansee(sp->x,sp->y,SPRITEp_TOS(sp),sp->sectnum,pp->posx, pp->posy, pp->posz, pp->cursectnum) && FACING(sp, u->tgt_sp))
1076
                                PlayerSound(straightsnds[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_doppler|v3df_follow|v3df_dontpan,pp);
1077
                        }
1078
                    }
1079
                }
1080
 
1081
                sp->x = tsp->x; // Mount up little bunny
1082
                sp->y = tsp->y;
1083
                sp->ang = tsp->ang;
1084
                sp->ang = NORM_ANGLE(sp->ang + 1024);
1085
                HelpMissileLateral(SpriteNum, 2000L);
1086
                sp->ang = tsp->ang;
1087
                u->Vis = sp->ang;  // Remember angles for later
1088
                tu->Vis = tsp->ang;
1089
 
1090
                NewStateGroup(SpriteNum, sg_BunnyScrew);
1091
                NewStateGroup(hitsprite, sg_BunnyScrew);
1092
                if (gs.ParentalLock || Global_PLock)
1093
                {
1094
                    SET(sp->cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' invisible
1095
                    SET(tsp->cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' invisible
1096
                }
1097
                u->WaitTics = tu->WaitTics = SEC(10);  // Mate for this long
1098
                return TRUE;
1099
            }
1100
        }
1101
    }
1102
 
1103
    return FALSE;
1104
}
1105
 
1106
 
1107
int
1108
NullBunny(short SpriteNum)
1109
{
1110
    SPRITEp sp = &sprite[SpriteNum];
1111
    USERp u = User[SpriteNum];
1112
 
1113
 
1114
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1115
    {
1116
        if (TEST(u->Flags, SPR_JUMPING))
1117
            DoActorJump(SpriteNum);
1118
        else
1119
            DoActorFall(SpriteNum);
1120
    }
1121
 
1122
    // stay on floor unless doing certain things
1123
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1124
        KeepActorOnFloor(SpriteNum);
1125
 
1126
    if (TEST(u->Flags,SPR_SLIDING))
1127
        DoActorSlide(SpriteNum);
1128
 
1129
    DoActorSectorDamage(SpriteNum);
1130
 
1131
    return 0;
1132
}
1133
 
1134
 
1135
int DoBunnyPain(short SpriteNum)
1136
{
1137
    SPRITEp sp = &sprite[SpriteNum];
1138
    USERp u = User[SpriteNum];
1139
 
1140
    NullBunny(SpriteNum);
1141
 
1142
    if ((u->WaitTics -= ACTORMOVETICS) <= 0)
1143
        InitActorDecide(SpriteNum);
1144
    return 0;
1145
}
1146
 
1147
int DoBunnyRipHeart(short SpriteNum)
1148
{
1149
    SPRITEp sp = &sprite[SpriteNum];
1150
    USERp u = User[SpriteNum];
1151
 
1152
    SPRITEp tsp = u->tgt_sp;
1153
 
1154
    NewStateGroup(SpriteNum, sg_BunnyHeart);
1155
    u->WaitTics = 6 * 120;
1156
 
1157
    // player face bunny
1158
    tsp->ang = getangle(sp->x - tsp->x, sp->y - tsp->y);
1159
    return 0;
1160
}
1161
 
1162
int DoBunnyStandKill(short SpriteNum)
1163
{
1164
    SPRITEp sp = &sprite[SpriteNum];
1165
    USERp u = User[SpriteNum];
1166
 
1167
    NullBunny(SpriteNum);
1168
 
1169
    // Growl like the bad ass bunny you are!
1170
    if (RANDOM_RANGE(1000) > 800)
1171
        PlaySound(DIGI_BUNNYATTACK,&sp->x,&sp->y,&sp->z,v3df_none);
1172
 
1173
    if ((u->WaitTics -= ACTORMOVETICS) <= 0)
1174
        NewStateGroup(SpriteNum, sg_BunnyRun);
1175
    return 0;
1176
}
1177
 
1178
void BunnyHatch(short Weapon)
1179
{
1180
    SPRITEp wp = &sprite[Weapon];
1181
    USERp wu = User[Weapon];
1182
 
1183
    short new,i;
1184
    SPRITEp np;
1185
    USERp nu;
1186
#define MAX_BUNNYS 1
1187
    short rip_ang[MAX_BUNNYS];
1188
 
1189
    rip_ang[0] = RANDOM_P2(2048);
1190
 
1191
    for (i = 0; i < MAX_BUNNYS; i++)
1192
    {
1193
        new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
1194
        np = &sprite[new];
1195
        memset(np,0,sizeof(SPRITE));
1196
        np->sectnum = wp->sectnum;
1197
        np->statnum = STAT_DEFAULT;
1198
        np->x = wp->x;
1199
        np->y = wp->y;
1200
        np->z = wp->z;
1201
        np->owner = -1;
1202
        np->xrepeat = 30;  // Baby size
1203
        np->yrepeat = 24;
1204
        np->ang = rip_ang[i];
1205
        np->pal = 0;
1206
        SetupBunny(new);
1207
        nu = User[new];
1208
        np->shade = wp->shade;
1209
 
1210
        // make immediately active
1211
        SET(nu->Flags, SPR_ACTIVE);
1212
        if (RANDOM_RANGE(1000) > 500) // Boy or Girl?
1213
            nu->spal = np->pal = PALETTE_PLAYER0; // Girl
1214
        else
1215
        {
1216
            nu->spal = np->pal = PALETTE_PLAYER8; // Boy
1217
            // Oops, mommy died giving birth to a boy
1218
            if (RANDOM_RANGE(1000) > 500)
1219
            {
1220
                wu->Health = 0;
1221
                Bunny_Count--; // Bunny died
1222
 
1223
                // Blood fountains
1224
                InitBloodSpray(Weapon,TRUE,-1);
1225
 
1226
                if (SpawnShrap(Weapon, new))
1227
                {
1228
                    SetSuicide(Weapon);
1229
                }
1230
                else
1231
                    DoActorDie(Weapon, new);
1232
            }
1233
        }
1234
 
1235
        nu->ShellNum = 0; // Not Pregnant right now
1236
 
1237
        NewStateGroup(new, nu->ActorActionSet->Jump);
1238
        nu->ActorActionFunc = DoActorMoveJump;
1239
        DoActorSetSpeed(new, FAST_SPEED);
1240
        PickJumpMaxSpeed(new, -600);
1241
 
1242
        SET(nu->Flags, SPR_JUMPING);
1243
        RESET(nu->Flags, SPR_FALLING);
1244
 
1245
        nu->jump_grav = 8;
1246
 
1247
        // if I didn't do this here they get stuck in the air sometimes
1248
        DoActorZrange(new);
1249
 
1250
        DoActorJump(new);
1251
    }
1252
}
1253
 
1254
int BunnyHatch2(short Weapon)
1255
{
1256
    SPRITEp wp = &sprite[Weapon];
1257
    USERp wu = User[Weapon];
1258
 
1259
    short new,i;
1260
    SPRITEp np;
1261
    USERp nu;
1262
 
1263
    new = COVERinsertsprite(wp->sectnum, STAT_DEFAULT);
1264
    np = &sprite[new];
1265
    memset(np,0,sizeof(SPRITE));
1266
    np->sectnum = wp->sectnum;
1267
    np->statnum = STAT_DEFAULT;
1268
    np->x = wp->x;
1269
    np->y = wp->y;
1270
    np->z = wp->z;
1271
    np->owner = -1;
1272
    np->xrepeat = 30;  // Baby size
1273
    np->yrepeat = 24;
1274
    np->ang = RANDOM_P2(2048);
1275
    np->pal = 0;
1276
    SetupBunny(new);
1277
    nu = User[new];
1278
    np->shade = wp->shade;
1279
 
1280
    // make immediately active
1281
    SET(nu->Flags, SPR_ACTIVE);
1282
    if (RANDOM_RANGE(1000) > 500) // Boy or Girl?
1283
    {
1284
        nu->spal = np->pal = PALETTE_PLAYER0; // Girl
1285
        nu->Flag1 = SEC(5);
1286
    }
1287
    else
1288
    {
1289
        nu->spal = np->pal = PALETTE_PLAYER8; // Boy
1290
        nu->Flag1 = 0;
1291
    }
1292
 
1293
    nu->ShellNum = 0; // Not Pregnant right now
1294
 
1295
    NewStateGroup(new, nu->ActorActionSet->Jump);
1296
    nu->ActorActionFunc = DoActorMoveJump;
1297
    DoActorSetSpeed(new, FAST_SPEED);
1298
    if (TEST_BOOL3(wp))
1299
    {
1300
        PickJumpMaxSpeed(new, -600-RANDOM_RANGE(600));
1301
        np->xrepeat = np->yrepeat = 64;
1302
        np->xvel = 150 + RANDOM_RANGE(1000);
1303
        nu->Health = 1; // Easy to pop. Like shootn' skeet.
1304
        np->ang -= RANDOM_RANGE(128);
1305
        np->ang += RANDOM_RANGE(128);
1306
    }
1307
    else
1308
        PickJumpMaxSpeed(new, -600);
1309
 
1310
    SET(nu->Flags, SPR_JUMPING);
1311
    RESET(nu->Flags, SPR_FALLING);
1312
 
1313
    nu->jump_grav = 8;
1314
    nu->FlagOwner = 0;
1315
 
1316
    nu->active_range = 75000; // Set it far
1317
 
1318
    // if I didn't do this here they get stuck in the air sometimes
1319
    DoActorZrange(new);
1320
 
1321
    DoActorJump(new);
1322
 
1323
    return new;
1324
}
1325
 
1326
int
1327
DoBunnyMove(short SpriteNum)
1328
{
1329
    SPRITEp sp = &sprite[SpriteNum];
1330
    USERp u = User[SpriteNum];
1331
 
1332
    // Parental lock crap
1333
    if (TEST(sp->cstat, CSTAT_SPRITE_INVISIBLE))
1334
        RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' back on
1335
 
1336
    // Sometimes they just won't die!
1337
    if (u->Health <= 0)
1338
        SetSuicide(SpriteNum);
1339
 
1340
    if (u->scale_speed)
1341
    {
1342
        DoScaleSprite(SpriteNum);
1343
    }
1344
 
1345
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1346
    {
1347
        if (TEST(u->Flags, SPR_JUMPING))
1348
            DoActorJump(SpriteNum);
1349
        else
1350
            DoActorFall(SpriteNum);
1351
    }
1352
 
1353
    // if on a player/enemy sprite jump quickly
1354
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1355
    {
1356
        DoBunnyQuickJump(SpriteNum);
1357
    }
1358
 
1359
    if (TEST(u->Flags, SPR_SLIDING))
1360
        DoActorSlide(SpriteNum);
1361
 
1362
    if (u->track >= 0)
1363
        ActorFollowTrack(SpriteNum, ACTORMOVETICS);
1364
    else
1365
        (*u->ActorActionFunc)(SpriteNum);
1366
 
1367
    // stay on floor unless doing certain things
1368
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1369
        KeepActorOnFloor(SpriteNum);
1370
 
1371
    DoActorSectorDamage(SpriteNum);
1372
 
1373
    if (RANDOM_RANGE(1000) > 985 && sp->pal != PALETTE_PLAYER1 && u->track < 0)
1374
    {
1375
        switch (sector[sp->sectnum].floorpicnum)
1376
        {
1377
        case 153:
1378
        case 154:
1379
        case 193:
1380
        case 219:
1381
        case 2636:
1382
        case 2689:
1383
        case 3561:
1384
        case 3562:
1385
        case 3563:
1386
        case 3564:
1387
            NewStateGroup(SpriteNum,sg_BunnyStand);
1388
            break;
1389
        default:
1390
            sp->ang = NORM_ANGLE(RANDOM_RANGE(2048 << 6) >> 6);
1391
            u->jump_speed = -350;
1392
            DoActorBeginJump(SpriteNum);
1393
            u->ActorActionFunc = DoActorMoveJump;
1394
            break;
1395
        }
1396
    }
1397
 
1398
    return 0;
1399
}
1400
 
1401
int
1402
BunnySpew(short SpriteNum)
1403
{
1404
    //InitBloodSpray(SpriteNum,TRUE,-1);
1405
    InitBloodSpray(SpriteNum,TRUE,-1);
1406
    return 0;
1407
}
1408
 
1409
int
1410
DoBunnyEat(short SpriteNum)
1411
{
1412
    SPRITEp sp = &sprite[SpriteNum];
1413
    USERp u = User[SpriteNum];
1414
 
1415
 
1416
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1417
    {
1418
        if (TEST(u->Flags, SPR_JUMPING))
1419
            DoActorJump(SpriteNum);
1420
        else
1421
            DoActorFall(SpriteNum);
1422
    }
1423
 
1424
    // if on a player/enemy sprite jump quickly
1425
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1426
    {
1427
        DoBunnyQuickJump(SpriteNum);
1428
    }
1429
 
1430
    if (TEST(u->Flags, SPR_SLIDING))
1431
        DoActorSlide(SpriteNum);
1432
 
1433
    // stay on floor unless doing certain things
1434
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1435
        KeepActorOnFloor(SpriteNum);
1436
 
1437
    DoActorSectorDamage(SpriteNum);
1438
 
1439
    switch (sector[sp->sectnum].floorpicnum)
1440
    {
1441
    case 153:
1442
    case 154:
1443
    case 193:
1444
    case 219:
1445
    case 2636:
1446
    case 2689:
1447
    case 3561:
1448
    case 3562:
1449
    case 3563:
1450
    case 3564:
1451
        if (RANDOM_RANGE(1000) > 970)
1452
            NewStateGroup(SpriteNum,sg_BunnyRun);
1453
        break;
1454
    default:
1455
        NewStateGroup(SpriteNum,sg_BunnyRun);
1456
        break;
1457
    }
1458
    return 0;
1459
}
1460
 
1461
int
1462
DoBunnyScrew(short SpriteNum)
1463
{
1464
    SPRITEp sp = &sprite[SpriteNum];
1465
    USERp u = User[SpriteNum];
1466
    int dist;
1467
 
1468
    if (TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1469
    {
1470
        if (TEST(u->Flags, SPR_JUMPING))
1471
            DoActorJump(SpriteNum);
1472
        else
1473
            DoActorFall(SpriteNum);
1474
    }
1475
 
1476
    if (TEST(u->Flags, SPR_SLIDING))
1477
        DoActorSlide(SpriteNum);
1478
 
1479
    // stay on floor unless doing certain things
1480
    if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING))
1481
        KeepActorOnFloor(SpriteNum);
1482
 
1483
    DoActorSectorDamage(SpriteNum);
1484
 
1485
    if (RANDOM_RANGE(1000) > 990) // Bunny sex sounds
1486
    {
1487
        if (!gs.ParentalLock && !Global_PLock)
1488
            PlaySound(DIGI_BUNNYATTACK, &sp->x, &sp->y, &sp->z, v3df_follow);
1489
    }
1490
 
1491
    u->WaitTics -= ACTORMOVETICS;
1492
 
1493
    if ((u->FlagOwner || u->spal == PALETTE_PLAYER0) && u->WaitTics > 0) // Keep Girl still
1494
        NewStateGroup(SpriteNum,sg_BunnyScrew);
1495
 
1496
    if (u->spal == PALETTE_PLAYER0 && u->WaitTics <= 0) // Female has baby
1497
    {
1498
        u->Flag1 = SEC(5); // Count down to babies
1499
        u->ShellNum = 1; // She's pregnant now
1500
    }
1501
 
1502
    if (u->WaitTics <= 0)
1503
    {
1504
        RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' back on
1505
        u->FlagOwner = 0;
1506
        NewStateGroup(SpriteNum,sg_BunnyRun);
1507
    }
1508
 
1509
    return 0;
1510
}
1511
 
1512
int
1513
DoBunnyGrowUp(short SpriteNum)
1514
{
1515
    SPRITEp sp = &sprite[SpriteNum];
1516
    USERp u = User[SpriteNum];
1517
 
1518
    if (sp->pal == PALETTE_PLAYER1) return 0;   // Don't bother white bunnies
1519
 
1520
    if ((u->Counter -= ACTORMOVETICS) <= 0)
1521
    {
1522
        if ((++sp->xrepeat) > 64) sp->xrepeat = 64;
1523
        if ((++sp->yrepeat) > 64) sp->yrepeat = 64;
1524
        u->Counter = 60;
1525
    }
1526
 
1527
    // Don't go homo too much!
1528
    if (sp->pal != PALETTE_PLAYER0 && u->Flag1 > 0)
1529
        u->Flag1 -= ACTORMOVETICS;
1530
 
1531
    // Gestation period for female rabbits
1532
    if (sp->pal == PALETTE_PLAYER0 && u->ShellNum > 0)
1533
    {
1534
        if ((u->Flag1 -= ACTORMOVETICS) <= 0)
1535
        {
1536
            if (Bunny_Count < 20)
1537
            {
1538
                PlaySound(DIGI_BUNNYDIE2, &sp->x, &sp->y, &sp->z, v3df_follow);
1539
                BunnyHatch(SpriteNum); // Baby time
1540
            }
1541
            u->ShellNum = 0; // Not pregnent anymore
1542
        }
1543
    }
1544
 
1545
    return 0;
1546
}
1547
 
1548
 
1549
#include "saveable.h"
1550
 
1551
static saveable_code saveable_bunny_code[] =
1552
{
1553
    SAVE_CODE(SetupBunny),
1554
    SAVE_CODE(GetBunnyJumpHeight),
1555
    SAVE_CODE(PickBunnyJumpSpeed),
1556
    SAVE_CODE(DoBunnyBeginJumpAttack),
1557
    SAVE_CODE(DoBunnyMoveJump),
1558
    SAVE_CODE(DoPickCloseBunny),
1559
    SAVE_CODE(DoBunnyQuickJump),
1560
    SAVE_CODE(NullBunny),
1561
    SAVE_CODE(DoBunnyPain),
1562
    SAVE_CODE(DoBunnyRipHeart),
1563
    SAVE_CODE(DoBunnyStandKill),
1564
    SAVE_CODE(BunnyHatch),
1565
    SAVE_CODE(BunnyHatch2),
1566
    SAVE_CODE(DoBunnyMove),
1567
    SAVE_CODE(BunnySpew),
1568
    SAVE_CODE(DoBunnyEat),
1569
    SAVE_CODE(DoBunnyScrew),
1570
    SAVE_CODE(DoBunnyGrowUp),
1571
};
1572
 
1573
static saveable_data saveable_bunny_data[] =
1574
{
1575
    SAVE_DATA(BunnyBattle),
1576
    SAVE_DATA(BunnyOffense),
1577
    SAVE_DATA(BunnyBroadcast),
1578
    SAVE_DATA(BunnySurprised),
1579
    SAVE_DATA(BunnyEvasive),
1580
    SAVE_DATA(BunnyLostTarget),
1581
    SAVE_DATA(BunnyCloseRange),
1582
    SAVE_DATA(BunnyWander),
1583
 
1584
    SAVE_DATA(WhiteBunnyPersonality),
1585
    SAVE_DATA(BunnyPersonality),
1586
 
1587
    SAVE_DATA(WhiteBunnyAttrib),
1588
    SAVE_DATA(BunnyAttrib),
1589
 
1590
    SAVE_DATA(s_BunnyRun),
1591
    SAVE_DATA(sg_BunnyRun),
1592
    SAVE_DATA(s_BunnyStand),
1593
    SAVE_DATA(sg_BunnyStand),
1594
    SAVE_DATA(s_BunnyScrew),
1595
    SAVE_DATA(sg_BunnyScrew),
1596
    SAVE_DATA(s_BunnySwipe),
1597
    SAVE_DATA(sg_BunnySwipe),
1598
    SAVE_DATA(s_BunnyHeart),
1599
    SAVE_DATA(sg_BunnyHeart),
1600
    SAVE_DATA(s_BunnyPain),
1601
    SAVE_DATA(sg_BunnyPain),
1602
    SAVE_DATA(s_BunnyJump),
1603
    SAVE_DATA(sg_BunnyJump),
1604
    SAVE_DATA(s_BunnyFall),
1605
    SAVE_DATA(sg_BunnyFall),
1606
    SAVE_DATA(s_BunnyJumpAttack),
1607
    SAVE_DATA(sg_BunnyJumpAttack),
1608
    SAVE_DATA(s_BunnyDie),
1609
    SAVE_DATA(sg_BunnyDie),
1610
    SAVE_DATA(s_BunnyDead),
1611
    SAVE_DATA(sg_BunnyDead),
1612
    SAVE_DATA(s_BunnyDeathJump),
1613
    SAVE_DATA(sg_BunnyDeathJump),
1614
    SAVE_DATA(s_BunnyDeathFall),
1615
    SAVE_DATA(sg_BunnyDeathFall),
1616
 
1617
    SAVE_DATA(BunnyActionSet),
1618
    SAVE_DATA(BunnyWhiteActionSet),
1619
};
1620
 
1621
saveable_module saveable_bunny =
1622
{
1623
    // code
1624
    saveable_bunny_code,
1625
    SIZ(saveable_bunny_code),
1626
 
1627
    // data
1628
    saveable_bunny_data,
1629
    SIZ(saveable_bunny_data)
1630
};