Skip to content

Commit

Permalink
svn r6488
Browse files Browse the repository at this point in the history
  • Loading branch information
lsalzman authored and sauerbraten committed Dec 22, 2020
1 parent cf6f1fe commit ccf4906
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/engine/octaedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ extern float rayent(const vec &o, const vec &ray, float radius, int mode, int si

VAR(gridlookup, 0, 0, 1);
VAR(passthroughcube, 0, 1, 1);
VAR(passthroughent, 0, 1, 1);
VARF(passthrough, 0, 0, 1, { passthroughsel = passthrough; entcancel(); });

void rendereditcursor()
{
Expand Down Expand Up @@ -391,9 +393,9 @@ void rendereditcursor()

wdist = rayent(player->o, camdir, 1e16f,
(editmode && showmat ? RAY_EDITMAT : 0) // select cubes first
| (!dragging && entediting ? RAY_ENTS : 0)
| (!dragging && entediting && (!passthrough || !passthroughent) ? RAY_ENTS : 0)
| RAY_SKIPFIRST
| (passthroughcube==1 ? RAY_PASS : 0), gridsize, entorient, ent);
| (passthroughcube || passthrough ? RAY_PASS : 0), gridsize, entorient, ent);

if((havesel || dragging) && !passthroughsel && !hmapedit) // now try selecting the selection
if(rayboxintersect(vec(sel.o), vec(sel.s).mul(sel.grid), player->o, camdir, sdist, orient))
Expand Down
7 changes: 6 additions & 1 deletion src/fpsgame/scoreboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ namespace game
{
if(best) score2 = groups[1]->score;
else for(int i = 1; i < groups.length(); ++i) if(isteam(player1->team, groups[i]->team)) { score2 = groups[i]->score; break; }
if(score2 == INT_MIN)
{
fpsent *p = followingplayer(player1);
if(p->state==CS_SPECTATOR) score2 = groups[1]->score;
}
}
}
else
Expand All @@ -538,7 +543,7 @@ namespace game
best = p == g->players[0];
if(g->players.length() > 1)
{
if(best) score2 = g->players[1]->frags;
if(best || p->state==CS_SPECTATOR) score2 = g->players[1]->frags;
else score2 = p->frags;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/glemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ namespace gle

GLE_INITATTRIBF(vertex, ATTRIB_VERTEX)
GLE_INITATTRIBF(color, ATTRIB_COLOR)
GLE_INITATTRIBN(color, ATTRIB_COLOR, ub, uchar, 255)
static inline void color(const bvec &v, uchar alpha = 255) { glVertexAttrib4Nub_(ATTRIB_COLOR, v.x, v.y, v.z, alpha); }
static inline void color(const bvec4 &v) { glVertexAttrib4Nubv_(ATTRIB_COLOR, v.v); }
static inline void color(const bvec &v, uchar alpha = 255) { color(bvec4(v, alpha)); }
static inline void colorub(uchar x, uchar y, uchar z, uchar w = 255) { color(bvec4(x, y, z, w)); }
GLE_INITATTRIBF(texcoord0, ATTRIB_TEXCOORD0)
GLE_INITATTRIBF(texcoord1, ATTRIB_TEXCOORD1)
static inline void normal(float x, float y, float z) { glVertexAttrib4f_(ATTRIB_NORMAL, x, y, z, 0.0f); }
Expand Down
2 changes: 1 addition & 1 deletion src/xcode/sauerbraten.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2020.12.04</string>
<string>2020.12.21</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>LSApplicationCategoryType</key>
Expand Down

0 comments on commit ccf4906

Please sign in to comment.