diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 84ac11f76..c80c2c47a 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -5993,17 +5993,17 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound) case ACSF_SpawnParticle: { - fixed_t x = args[0]; - fixed_t y = args[1]; - fixed_t z = args[2]; - fixed_t xvel = args[3]; - fixed_t yvel = args[4]; - fixed_t zvel = args[5]; - PalEntry color = args[6]; + PalEntry color = args[0]; + fixed_t x = args[1]; + fixed_t y = args[2]; + fixed_t z = args[3]; + fixed_t xvel = args[4]; + fixed_t yvel = args[5]; + fixed_t zvel = args[6]; int lifetime = args[7]; bool fullbright = argCount > 8 ? !!args[8] : false; - int startalpha = argCount > 9 ? args[9] : 0xFF; // Byte trans - int size = argCount > 10 ? args[10] : 1; + int size = argCount > 9 ? args[9] : 1; + int startalpha = argCount > 10 ? args[10] : 0xFF; // Byte trans int fadestep = argCount > 11 ? args[11] : -1; fixed_t accelx = argCount > 12 ? args[12] : 0; fixed_t accely = argCount > 13 ? args[13] : 0; diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 3770001c9..bd02127ae 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2645,23 +2645,23 @@ enum SPFflag DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnParticle) { ACTION_PARAM_START(15); - ACTION_PARAM_FIXED(xoff, 0); - ACTION_PARAM_FIXED(yoff, 1); - ACTION_PARAM_FIXED(zoff, 2); - ACTION_PARAM_FIXED(xvel, 3); - ACTION_PARAM_FIXED(yvel, 4); - ACTION_PARAM_FIXED(zvel, 5); - ACTION_PARAM_COLOR(color, 6); - ACTION_PARAM_INT(lifetime, 7); - ACTION_PARAM_INT(flags, 8); - ACTION_PARAM_FIXED(startalphaf, 9); - ACTION_PARAM_INT(size, 10); - ACTION_PARAM_FIXED(fadestepf, 11); - ACTION_PARAM_FIXED(accelx, 12); - ACTION_PARAM_FIXED(accely, 13); - ACTION_PARAM_FIXED(accelz, 14); - ACTION_PARAM_ANGLE(angle, 15); - + ACTION_PARAM_COLOR(color, 0); + ACTION_PARAM_FIXED(xoff, 1); + ACTION_PARAM_FIXED(yoff, 2); + ACTION_PARAM_FIXED(zoff, 3); + ACTION_PARAM_FIXED(xvel, 4); + ACTION_PARAM_FIXED(yvel, 5); + ACTION_PARAM_FIXED(zvel, 6); + ACTION_PARAM_ANGLE(angle, 7); + ACTION_PARAM_INT(lifetime, 8); + ACTION_PARAM_INT(flags, 9); + ACTION_PARAM_INT(size, 10); + ACTION_PARAM_FIXED(startalphaf, 11); + ACTION_PARAM_FIXED(fadestepf, 12); + ACTION_PARAM_FIXED(accelx, 13); + ACTION_PARAM_FIXED(accely, 14); + ACTION_PARAM_FIXED(accelz, 15); + BYTE startalpha = (BYTE)Scale(clamp(startalphaf, 0, FRACUNIT), 255, FRACUNIT); int fadestep = fadestepf < 0? -1 : Scale(clamp(fadestepf, 0, FRACUNIT), 255, FRACUNIT); lifetime = clamp(lifetime, 0, 0xFF); // Clamp to byte diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 07dd0871b..3ae298051 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -234,7 +234,7 @@ ACTOR Actor native //: Thinker action native A_SetScale(float scalex, float scaley = 0, int ptr = AAPTR_DEFAULT); action native A_SetMass(int mass); action native A_SpawnDebris(class spawntype, bool transfer_translation = false, float mult_h = 1, float mult_v = 1); - action native A_SpawnParticle(float xoff, float yoff, float zoff, float velx, float vely, float velz, color color1, int lifetime, int flags = 0, float startalpha = 1, int size = 1, float fadestep = -1, float accelx = 0.0, float accely = 0.0, float accelz = 0.0, float angle = 0); + action native A_SpawnParticle(color color1, float xoff, float yoff, float zoff, float velx, float vely, float velz, int lifetime, float angle = 0, int flags = 0, int size = 1, float startalphaf = 1, float fadestepf = -1, float accelx = 0.0, float accely = 0.0, float accelz = 0.0); action native A_CheckSight(state label); action native A_ExtChase(bool usemelee, bool usemissile, bool playactive = true, bool nightmarefast = false); action native A_DropInventory(class itemtype);