Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - QwazyWabbit

Pages: 1 [2]
0x1337c0de / Need Help Coding Chase in-eyes View
« on: March 13, 2011, 09:52:21 PM »
OK, it looks like no-one has ever solved the problem of player clipping in the in-eyes view mode. The original Q2 code had chasecam from behind the chased player. Setting in-eyes would seem to be just a matter of copying the target player's look-angle into the chasing view but this renders the chaser's POV inside the head of the target player with all the nice artifacts dancing in the view. I've got semi-working chasecam code but I get lost in the vector functions and can't tell when to use gi.trace, VectorMA, VectorNormalize, etc.

Maybe we can put our collective heads together and figure this one out.

Here's what I have so far:

void ChaseCamUpdate(edict_t *ent)
   vec3_t o, ownerv, goal;
   edict_t *targ;
   vec3_t forward;
   trace_t trace;
   vec3_t angles;

   assert(ent != NULL);
   targ = ent->client->chase_target;

   VectorCopy(targ->s.origin, ownerv);

   if (ent->client->chase_mode == CHASE_EYES)
      VectorCopy (targ->s.origin, goal);
      goal[2] += targ->viewheight + 6;
   if (ent->client->chase_mode == CHASE_THIRDPERSON)
      ownerv[2] += targ->viewheight;

      VectorCopy(targ->client->v_angle, angles);
      if (angles[PITCH] > ent->lclient->cam_maxpitch)
         angles[PITCH] = ent->lclient->cam_maxpitch;
      AngleVectors (angles, forward, NULL, NULL);
      VectorMA(ownerv, -ent->lclient->cam_distance, forward, o);

      if (o[2] < targ->s.origin[2] + ent->lclient->cam_height)
         o[2] = targ->s.origin[2] + ent->lclient->cam_height;

      // jump animation lifts
      if (!targ->groundentity)
         o[2] += ent->lclient->cam_jump;

      trace = gi.trace(ownerv, vec3_origin, vec3_origin, o, targ, MASK_SOLID);
      VectorCopy(trace.endpos, goal);
      VectorMA(goal, 2, forward, goal);

      // pad for floors and ceilings
      VectorCopy(goal, o);
      o[2] += 6;
      trace = gi.trace(goal, vec3_origin, vec3_origin, o, targ, MASK_SOLID);
      if (trace.fraction < 1)
         VectorCopy(trace.endpos, goal);
         goal[2] -= 6;

      VectorCopy(goal, o);
      o[2] -= 6;
      trace = gi.trace(goal, vec3_origin, vec3_origin, o, targ, MASK_SOLID);
      if (trace.fraction < 1)
         VectorCopy(trace.endpos, goal);
         goal[2] += 6;

   //common to all chase modes
 VectorCopy(goal, ent->s.origin);

      int i;
      ent->client->ps.pmove.pm_type = PM_FREEZE;
      for(i = 0; i < 3; i++)
         ent->client->ps.pmove.delta_angles = ANGLE2SHORT(targ->client->v_angle - ent->client->resp.cmd_angles);

      VectorCopy(targ->client->v_angle, ent->client->ps.viewangles);
      VectorCopy(targ->client->v_angle, ent->client->v_angle);
      ent->client->ps.pmove.pm_type = PM_NORMAL;

   ent->viewheight = 0;
   ent->client->ps.pmove.pm_flags |= PMF_NO_PREDICTION;

I've highlighted the relevant block in yellow, this produces a in-head view, slightly elevated by 6 units, just to make it a little less annoying. I think the solution would be to push the camera POV forward of the targ->s.origin but I don't know how to do that at the moment.

Another solution might be to ID the chased player and then not render him in the chasing client.

Ideas anyone?

Politics / Why isn't Wall Street in Jail?
« on: February 19, 2011, 04:48:23 PM »

Politics / Snake Oil Salesman
« on: November 25, 2009, 11:49:28 AM »
It's the CO2! It's the CO2! It's the CO2!
Well, maybe it's not the CO2, but we need to expand the effort to reduce other gases!
Here, we have a clearinghouse already established for the purpose and it still makes me money.

Admission is free, pay at the door
Pull up a chair or sit on the floor
It doesn't matter where you sit
The guy behind you is sure to spit.

Al Gore Admits CO2 Does Not Cause Majority Of Global Warming
Wednesday, November 4, 2009

In a new development that is potentially devastating to the agenda to introduce a global carbon tax and a cap and trade system, Al Gore admits that the majority of global warming that occurred until 2001 was not primarily caused by CO2.

Before we get too excited, Gore is not backing away from his support for the theory of man-made climate change, but his concession that carbon dioxide only accounted for 40% of warming according to new studies could seriously harm efforts to tax CO2, that evil, life-giving gas that humans exhale and plants absorb.

“Gore acknowledged to Newsweek that the findings could complicate efforts to build a political consensus around the need to limit carbon emissions,” reports BB News.

Yesterday we reported on how Gore was set to become the first “carbon billionaire” on the back of vast profits from companies invested in the “green revolution” that the former vice-president has a hefty stake in.

We also highlighted how the Chicago Climate Exchange (CCX) has direct ties to both Al Gore and Maurice Strong, two figures intimately involved with a long standing movement to use the theory of man made global warming as a mechanism for profit and social engineering. Gore’s investment company, Generation Investment Management, which sells carbon offset opportunities, is the largest shareholder of CCX.

Gore stands to make windfall profits from his stake in carbon trading systems that would be used to manage the cap and trade system currently being readied for passage in the Senate, but his admission that CO2 is far less of a threat than global warming alarmists have been claiming could be a terminal blow for such a proposal.

As Andrew Bolt writes in today’s Australian Herald Sun, his flip-flopping “Suggests not only that was Gore wrong to claim the science was “settled”, but that the hugely expensive schemes to “stop” warming by slashing carbon dioxide emissions will be less than half as effective as claimed.”

“Over the years I have been among those who focused most of all on CO2, and I think that’s still justified,” Gore told Newsweek . “But a comprehensive plan to solve the climate crisis has to widen the focus to encompass strategies for all” of the greenhouse culprits identified in the Nasa study.”

Gore now blames soot and methane for the majority of global warming, leaving the door open for a tax on livestock, a tax on meat, a tax on milk, and on and on until he changes his mind again and blames another culprit so that too can be taxed.

In another indictment of Gore’s accuracy in warning about climate change, he has now virtually abandoned scientific “facts” in favor of characterizing his Inconvenient Truth presentation in the context of a religious sermon.

“Simply laying out the facts won’t work,” admits Gore.

That’s right, the church of environmentalism has come full circle with Gore’s intention to deliver his widely debunked presentation with spiritual overtones, a move that will shock most hard-headed empirical scientists.

“I’ve done a Christian [-based] training program; I have a Muslim training program and a Jewish training program coming up, also a Hindu program coming up. I trained 200 Christian ministers and lay leaders here in Nashville in a version of the slide show that is filled with scriptural references. It’s probably my favorite version, but I don’t use it very often because it can come off as proselytizing,” Gore tells Newsweek.

In a new book Gore has been working on, he attempts to address the rapidly growing skepticism towards global warming alarmism not with science, but by blaming people’s own thoughts, a Kafkaesque cop-out if ever there was one.

According to the book’s press release, “Among the most unique approaches Gore takes in the book is showing readers how our own minds can be an impediment to change.”

“Our own minds are the enemy! Don’t free the minds – imprison them!,” scoffs Tim Blair.

Pages: 1 [2]