testqbsp: add lavawater test

This commit is contained in:
Eric Wasylishen 2022-06-08 01:01:17 -06:00
parent 6c3b8a9413
commit c8841fb1bf
2 changed files with 49 additions and 0 deletions

View File

@ -1154,6 +1154,20 @@ TEST_CASE("lavaclip", "[testmaps_q2]") {
CHECK(texinfo->flags.native == (Q2_SURF_LIGHT | Q2_SURF_WARP));
}
/**
* e1u1/brlava brush intersecting e1u1/brwater
**/
TEST_CASE("lavawater", "[testmaps_q2]") {
const mbsp_t bsp = LoadTestmap("qbsp_q2_lavawater.map", {"-q2bsp"});
CHECK(GAME_QUAKE_II == bsp.loadversion->game->id);
const qvec3d inside_both { 0, 32, 8};
// check leaf contents
CHECK((Q2_CONTENTS_LAVA | Q2_CONTENTS_WATER) == BSP_FindLeafAtPoint(&bsp, &bsp.dmodels[0], inside_both)->contents);
}
/**
* Weird mystery issue with a func_wall with broken collision
*/

View File

@ -0,0 +1,35 @@
// Game: Quake 2
// Format: Quake2
// entity 0
{
"classname" "worldspawn"
"_tb_textures" "textures/e1u1"
// brush 0
{
( -64 -64 -16 ) ( -64 -63 -16 ) ( -64 -64 -15 ) e1u1/brlava 0 0 0 1 1 8 9 700
( -64 -64 -16 ) ( -64 -64 -15 ) ( -63 -64 -16 ) e1u1/brlava 0 0 0 1 1 8 9 700
( -64 -64 -16 ) ( -63 -64 -16 ) ( -64 -63 -16 ) e1u1/brlava 0 0 0 1 1 8 9 700
( 64 64 16 ) ( 64 65 16 ) ( 65 64 16 ) e1u1/brlava 0 0 0 1 1 8 9 700
( 64 64 16 ) ( 65 64 16 ) ( 64 64 17 ) e1u1/brlava 0 0 0 1 1 8 9 700
( 64 64 16 ) ( 64 64 17 ) ( 64 65 16 ) e1u1/brlava 0 0 0 1 1 8 9 700
}
// brush 1
{
( -64 -64 0 ) ( -64 -63 0 ) ( -64 -64 1 ) e1u1/brwater 0 0 0 1 1 32 9 0
( -112 -64 0 ) ( -112 -64 1 ) ( -111 -64 0 ) e1u1/brwater 0 0 0 1 1 32 9 0
( -112 -64 -16 ) ( -111 -64 -16 ) ( -112 -63 -16 ) e1u1/brwater 0 0 0 1 1 32 9 0
( 112 0 16 ) ( 112 1 16 ) ( 113 0 16 ) e1u1/brwater 0 0 0 1 1 32 9 0
( 112 64 16 ) ( 113 64 16 ) ( 112 64 17 ) e1u1/brwater 0 0 0 1 1 32 9 0
( 64 0 16 ) ( 64 0 17 ) ( 64 1 16 ) e1u1/brwater 0 0 0 1 1 32 9 0
}
}
// entity 1
{
"classname" "info_player_start"
"origin" "-16 -32 40"
}
// entity 2
{
"classname" "info_notnull"
"origin" "0 32 8"
}