diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 71c0f53f..57bcc07c 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4112,6 +4112,7 @@ enum EACSFunctions ACSF_SetCVarString, ACSF_GetUserCVarString, ACSF_SetUserCVarString, + ACSF_LineAttack, // ZDaemon ACSF_GetTeamScore = 19620, // (int team) @@ -4853,6 +4854,33 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) } break; + //[RC] A bullet firing function for ACS. Thanks to DavidPH. + case ACSF_LineAttack: + { + fixed_t angle = args[1] << FRACBITS; + fixed_t pitch = args[2] << FRACBITS; + int damage = args[3]; + FName pufftype = argCount > 4 && args[4]? FName(FBehavior::StaticLookupString(args[4])) : NAME_BulletPuff; + FName damagetype = argCount > 5 && args[5]? FName(FBehavior::StaticLookupString(args[5])) : NAME_None; + fixed_t range = argCount > 6 && args[6]? args[6] : 0x7FFFFFFF; + + if (args[0] == 0) + { + P_LineAttack(activator, angle, range, pitch, damage, damagetype, pufftype); + } + else + { + AActor *source; + FActorIterator it(args[0]); + + while ((source = it.Next()) != NULL) + { + P_LineAttack(activator, angle, range, pitch, damage, damagetype, pufftype); + } + } + } + break; + default: break; } diff --git a/src/r_data/voxels.cpp b/src/r_data/voxels.cpp index 69398670..d5ad1fa8 100644 --- a/src/r_data/voxels.cpp +++ b/src/r_data/voxels.cpp @@ -71,13 +71,14 @@ TDeletingArray VoxelDefs; struct VoxelOptions { VoxelOptions() - : DroppedSpin(0), PlacedSpin(0), Scale(FRACUNIT), AngleOffset(ANGLE_90) + : DroppedSpin(0), PlacedSpin(0), Scale(FRACUNIT), AngleOffset(ANGLE_90), OverridePalette(false) {} int DroppedSpin; int PlacedSpin; fixed_t Scale; angle_t AngleOffset; + bool OverridePalette; }; //========================================================================== @@ -408,6 +409,20 @@ void FVoxel::Remap() { RemapVoxelSlabs((kvxslab_t *)Mips[i].SlabData, Mips[i].OffsetX[Mips[i].SizeX], remap); } + RemovePalette(); + } +} + +//========================================================================== +// +// Delete the voxel's built-in palette +// +//========================================================================== + +void FVoxel::RemovePalette() +{ + if (Palette != NULL) + { delete [] Palette; Palette = NULL; } @@ -518,6 +533,10 @@ static void VOX_ReadOptions(FScanner &sc, VoxelOptions &opts) } opts.AngleOffset = ANGLE_90 + angle_t(sc.Float * ANGLE_180 / 180.0); } + else if (sc.Compare("overridepalette")) + { + opts.OverridePalette = true; + } else { sc.ScriptMessage("Unknown voxel option '%s'\n", sc.String); @@ -603,6 +622,10 @@ void R_InitVoxels() sc.SetCMode(false); if (voxeldata != NULL && vsprites.Size() != 0) { + if (opts.OverridePalette) + { + voxeldata->RemovePalette(); + } FVoxelDef *def = new FVoxelDef; def->Voxel = voxeldata; diff --git a/src/r_data/voxels.h b/src/r_data/voxels.h index 90b57e0a..9dce7820 100644 --- a/src/r_data/voxels.h +++ b/src/r_data/voxels.h @@ -42,6 +42,7 @@ struct FVoxel FVoxel(); ~FVoxel(); void Remap(); + void RemovePalette(); }; struct FVoxelDef diff --git a/src/svnrevision.h b/src/svnrevision.h index 78c61c4d..521a3218 100644 --- a/src/svnrevision.h +++ b/src/svnrevision.h @@ -3,5 +3,5 @@ // This file was automatically generated by the // updaterevision tool. Do not edit by hand. -#define ZD_SVN_REVISION_STRING "4301" -#define ZD_SVN_REVISION_NUMBER 4301 +#define ZD_SVN_REVISION_STRING "4304" +#define ZD_SVN_REVISION_NUMBER 4304 diff --git a/src/v_font.cpp b/src/v_font.cpp index fad3243e..d34b08be 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -2649,7 +2649,12 @@ void V_InitFonts() } if (!(BigFont = FFont::FindFont("BigFont"))) { - if (gameinfo.gametype & GAME_DoomChex) + int lump = Wads.CheckNumForName("BIGFONT"); + if (lump >= 0) + { + BigFont = new FSingleLumpFont("BigFont", lump); + } + else if (gameinfo.gametype & GAME_DoomChex) { BigFont = new FSingleLumpFont ("BigFont", Wads.GetNumForName ("DBIGFONT")); } @@ -2659,7 +2664,15 @@ void V_InitFonts() } else { - BigFont = new FFont ("BigFont", "FONTB%02u", HU_FONTSTART, HU_FONTSIZE, 1, -1); + lump = Wads.CheckNumForName("HBIGFONT"); + if (lump >= 0) + { + BigFont = new FSingleLumpFont("BigFont", lump); + } + else + { + BigFont = new FFont ("BigFont", "FONTB%02u", HU_FONTSTART, HU_FONTSIZE, 1, -1); + } } } if (!(ConFont = FFont::FindFont("ConsoleFont")))