Free hunt: only spawn ghosts that have an uploaded video
Add `AND webm_path IS NOT NULL` to the /api/freehunt pool so free-hunt mode only selects ghosts with real media (and their derived webp/image fallbacks), never bare procedural-wisp ghosts.
This commit is contained in:
+3
-1
@@ -75,7 +75,9 @@ router.get('/scan/:code', (req, res) => {
|
||||
router.get('/freehunt', (req, res) => {
|
||||
const n = Math.min(parseInt(req.query.n, 10) || 3, 10);
|
||||
const type = req.query.type; // optional red|yellow|blue filter
|
||||
let q = 'SELECT * FROM ghosts WHERE enabled = 1 AND is_boss = 0';
|
||||
// Free hunt only spawns ghosts with an uploaded video (webm); the webp/image
|
||||
// fallbacks are derived from it, so these always render on every platform.
|
||||
let q = 'SELECT * FROM ghosts WHERE enabled = 1 AND is_boss = 0 AND webm_path IS NOT NULL';
|
||||
const params = [];
|
||||
if (type && ['red', 'yellow', 'blue'].includes(type)) {
|
||||
q += ' AND type = ?';
|
||||
|
||||
Reference in New Issue
Block a user