.qc (dot qc) - the group for quake c coders of all denominations. If you make quake one mods and write code in quake c, join our group! I'll try to answer any quake c questions - please post your inquiry in the forums...

Forum Thread
Portal proof wall (Groups : qc : Forum : hard_code() : Portal proof wall) Locked
Thread Options
numbersix quake-c coder++
Oct 10 2012 Anchor

This post is for map editing with the "Quake Portal Mod": Moddb.com

The Question:

"How do I make a wall where you cant open a portal?"

The Answer:

This entity will block portals:

/*QUAKED ass_portalproof
Creates the wall, that can't bear portals. */

void() ass_portalproof =
self.solid = SOLID_BSP;
self.movetype = MOVETYPE_PUSH;
setorigin (self, self.origin);
setmodel (self, self.model);
self.classname = "portalproof";

As coded in this fragment of "void(entity own, entity hit, vector org, vector plane) T_PortalSpawn":

//portal-proof entities
if ( (hit.classname == "portalproof") || (hit.classname == "door")
|| (hit.classname == "hardlight2") || (hit.classname == "pellet") )
//spawn just to remove it (in fancy way)
p = spawn();
p.fixangle = 1;
plane_z = -plane_z;
p.angles = vectoangles(plane);
setorigin (p, org);

What is ass_portalproof ?

This entity is just like a func_wall. So what is a func_wall ?

A func_wall is an entity that looks just like a solid wall and functions just like one. iD made it for walls that appear in single player or deathmatch and not the other.

For an example, load e1m7 (house of cthon) in sp and dm. Notice the spawn platforms (along the upper run to either side of the electrode lowering buttons) in dm that dont appear in single player. Those are func_wall with "spawnflags" "1792" (spawnflags control for all entities what game difficulty they appear in - 1792 is only appearing in deathmatch.)

So, ass_portalproof looks and works just like a solid wall. Except that the portal forming code above detects it as portal proof.
(You could even have _more_ portal proof walls like this on a map in the harder difficulty with "spawnflags" "768" (doesnt appear in easy or medium) and the same wall as a func_wall with "spawnflags" "1024" (doesnt appear in hard or nightmare) - so the same wall twice, one ass_portalproof , and one a func_wall with different spawnflags.)

How would you make a portal proof wall?

Well if you have the custom entity set for this mod, you make it just like you make a func_wall.

1. Make the wall with the appearance and location in the level you desire
2. Select all parts of the wall (if more than one brush)
3. Make entity "ass_portalproof"

or alternately at step 3 (if there is no custom entity set for your editor)

3. Make entity a func_wall (this should be in the standard entity set for a quake 1 map editor.)
4. Edit this wall in entity editor of the map editor, or open with a text editor
5. Change "classname" "func_wall" to "classname" "ass_portalproof"

Compile the map and load it in the mod - you should now have a portal proof wall.

Jan 17 2013 Anchor

You can also use NOPORTAL texture on brush that you want them to look as portal proof for example open portal_gun/src/mapspellet.map in radiant editor
and examine how portal proof brush are made.
details for mapping here: Github.com

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Got it!

We have recently updated our privacy policy and terms of use in-line with GDPR requirements. More Info?