63 int sprite_slot = 1000;
64 for (
unsigned int i = 0; i < MAX_SPRITE_OBJECTS; ++i) {
72 if (sprite_slot >= MAX_SPRITE_OBJECTS) {
163 bool on_water =
false;
167 object->uHeight, &on_water, &v55, 0);
174 if (v55) v9 = v6 + 30;
221 (
signed __int16)v21 < 10))
236 memset(&Dst, 0, 0x68u);
247 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
261 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
287 for (v55 = 0; v55 < 100; ++v55) {
316 .GetActorsRelation(&
pActors[v56]))
329 object->uHeight, &v49, &v50, 0);
330 if (on_water && v26 < v27 + 60) {
350 memset(&Dst, 0, 0x68u);
361 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
377 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
412 if (
face->uAttributes & FACE_UNKNOW2)
431 if (
face->pFacePlane.vNormal.z <= 32000) {
432 v37 = 2 * (short)v60;
440 if (
face->uAttributes & FACE_UNKNOW2)
471 unsigned int uFaceID;
478 if (abs(pSpriteObject->
vPosition.x) > 32767 ||
479 abs(pSpriteObject->
vPosition.y) > 32767 ||
480 abs(pSpriteObject->
vPosition.z) > 20000 ||
481 floor_lvl <= -30000 && (pSpriteObject->
uSectorID == 0)) {
504 for (
int loop = 0; loop < 100; loop++) {
521 for (
int loop2 = 0; loop2 < 100; ++loop2) {
528 for (
int actloop = 0; actloop < (
signed int)
uNumActors; ++actloop) {
537 if (
pActors[actloop].word_000086_some_monster_id) {
553 if (!(pObject->
uFlags & 0x100))
return;
554 memset(&Dst, 0, 0x68u);
565 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
581 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
675 if ((
signed __int16)v17 < 10)
724 if (floor_lvl <= pSpriteObject->
vPosition.z - 3) {
732 pSpriteObject->
vPosition.z = floor_lvl + 1;
750 memset(&Dst, 0, 0x68u);
762 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
778 Dst.
timeToLive = (
unsigned __int8)(rand() & 0x80) + 128;
794 std::swap(dir_x, dir_y);
797 std::swap(dir_x, dir_z);
800 std::swap(dir_y, dir_z);
802 unsigned int v10 = ((
unsigned int)(11 * dir_y) >> 5) + (dir_z / 4) + dir_x;
807 v11 += rand() % 20 + 1;
811 switch (this->
uType) {
827 for (
unsigned int i = 1; i <= 4; ++i) {
828 int v13 =
pPlayers[i]->GetPerception() + 20;
829 if (
pPlayers[i]->CanAct() && (rand() % v13 > 20))
832 pPlayers[i]->ReceiveDamage(v11, pDamageType);
885 for (
int i = 0; i < MAX_SPRITE_OBJECTS; ++i) {
887 if (i != new_obj_pos) {
922 if (v11 >= v7 * v7 + v9 * v9 + v10 * v10) {
927 this->spell_skill, 4, 0, 0);
928 pActors[i].uAttributes |= 0x80000;
938 int y,
int z,
int a4,
int count,
939 int a7,
unsigned __int16 attributes,
951 pSpellObject.
uType = sprite;
1011 int objID = a1.
Create(0, 0, 0, 0);
1020 unsigned int v107 = 0;
1050 if (PID_ID(
pSpriteObjects[uLayingItemID].spell_caster_pid) < 500)
1126 if (
pSpriteObjects[uLayingItemID].containing_item.uItemID != 405 &&
1127 pSpriteObjects[uLayingItemID].containing_item.special_enchantment != 3) {
1191 object->uParticleTrailColor);
1262 for (
int i = 0; i < v65; i++) {
1309 if (PID_TYPE(a2) == 6 || PID_TYPE(a2) == 5 || !PID_TYPE(a2)) {
1350 for (
int i = 0; i < 8; i++) {
1523 if (v152 >= 3) v150 = 4;
1525 pActors[PID_ID(a2)].uAttributes |= ACTOR_AGGRESSOR;
1553 pActors[v108].UpdateAnimation();
1555 pActors[v108].pActorBuffs[v136].Apply(
1662 if (PID_TYPE(a2) == 3)
return 1;
1687 object->uParticleTrailColor);
1725 switch (PID_TYPE(
pSpriteObjects[uLayingItemID].spell_caster_pid)) {