Fix dead guard not spawning at the beginning of the level
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wolf_3d_flutter/wolf_3d.dart';
|
||||
import 'package:wolf_dart/game_select_screen.dart';
|
||||
import 'package:wolf_dart/screens/game_select_screen.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wolf_3d_data_types/wolf_3d_data_types.dart';
|
||||
import 'package:wolf_3d_flutter/wolf_3d.dart';
|
||||
import 'package:wolf_dart/features/screens/difficulty_screen.dart';
|
||||
import 'package:wolf_dart/screens/difficulty_screen.dart';
|
||||
|
||||
class EpisodeScreen extends StatefulWidget {
|
||||
const EpisodeScreen({super.key});
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wolf_3d_data_types/wolf_3d_data_types.dart';
|
||||
import 'package:wolf_3d_flutter/wolf_3d.dart';
|
||||
import 'package:wolf_dart/features/screens/episode_screen.dart';
|
||||
import 'package:wolf_dart/screens/episode_screen.dart';
|
||||
|
||||
class GameSelectScreen extends StatelessWidget {
|
||||
const GameSelectScreen({super.key});
|
||||
@@ -318,6 +318,10 @@ abstract class Enemy extends Entity {
|
||||
// 1. Check Difficulty & Compatibility
|
||||
if (!MapObject.shouldSpawn(objId, difficulty)) return null;
|
||||
|
||||
// Explicitly ignore "Dead Guard" Map ID so Decorative.trySpawn can handle it
|
||||
// In Wolf3D, 124 is the dead guard.
|
||||
if (objId == 124) return null;
|
||||
|
||||
// If the checkbox is checked, block non-Shareware enemies
|
||||
if (isSharewareMode && !MapObject.isSharewareCompatible(objId)) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user