diff options
Diffstat (limited to 'Doc/doxygen/html/_shot_8cpp_source.html')
-rw-r--r-- | Doc/doxygen/html/_shot_8cpp_source.html | 743 |
1 files changed, 743 insertions, 0 deletions
diff --git a/Doc/doxygen/html/_shot_8cpp_source.html b/Doc/doxygen/html/_shot_8cpp_source.html new file mode 100644 index 0000000..c758678 --- /dev/null +++ b/Doc/doxygen/html/_shot_8cpp_source.html @@ -0,0 +1,743 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<title>Starshatter_Open: D:/SRC/StarshatterSVN/Stars45/Shot.cpp Source File</title> +<link href="tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="jquery.js"></script> +<script type="text/javascript" src="dynsections.js"></script> +<link href="navtree.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="resize.js"></script> +<script type="text/javascript" src="navtree.js"></script> +<script type="text/javascript"> + $(document).ready(initResizable); +</script> +<link href="search/search.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="search/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { searchBox.OnSelectItem(0); }); +</script> +<link href="doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td style="padding-left: 0.5em;"> + <div id="projectname">Starshatter_Open + </div> + <div id="projectbrief">Open source Starshatter engine</div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.1 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> + <div id="navrow1" class="tabs"> + <ul class="tablist"> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li class="current"><a href="files.html"><span>Files</span></a></li> + <li> + <div id="MSearchBox" class="MSearchBoxInactive"> + <span class="left"> + <img id="MSearchSelect" src="search/mag_sel.png" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + alt=""/> + <input type="text" id="MSearchField" value="Search" accesskey="S" + onfocus="searchBox.OnSearchFieldFocus(true)" + onblur="searchBox.OnSearchFieldFocus(false)" + onkeyup="searchBox.OnSearchFieldChange(event)"/> + </span><span class="right"> + <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> + </span> + </div> + </li> + </ul> + </div> + <div id="navrow2" class="tabs2"> + <ul class="tablist"> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul> + </div> +</div><!-- top --> +<div id="side-nav" class="ui-resizable side-nav-resizable"> + <div id="nav-tree"> + <div id="nav-tree-contents"> + </div> + </div> + <div id="splitbar" style="-moz-user-select:none;" + class="ui-resizable-handle"> + </div> +</div> +<script type="text/javascript"> +$(document).ready(function(){initNavTree('_shot_8cpp.html','');}); +</script> +<div id="doc-content"> +<!-- window showing the filter options --> +<div id="MSearchSelectWindow" + onmouseover="return searchBox.OnSearchSelectShow()" + onmouseout="return searchBox.OnSearchSelectHide()" + onkeydown="return searchBox.OnSearchSelectKey(event)"> +<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Macros</a></div> + +<!-- iframe showing the search results (closed by default) --> +<div id="MSearchResultsWindow"> +<iframe src="javascript:void(0)" frameborder="0" + name="MSearchResults" id="MSearchResults"> +</iframe> +</div> + +<div class="header"> + <div class="headertitle"> +<div class="title">Shot.cpp</div> </div> +</div><!--header--> +<div class="contents"> +<a href="_shot_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* Project Starshatter 4.5</span></div> +<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> Destroyer Studios LLC</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> Copyright (C) 1997-2004. All Rights Reserved.</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"></span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> SUBSYSTEM: Stars.exe</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> FILE: Shot.cpp</span></div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> AUTHOR: John DiCamillo</span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span></div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"></span></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> OVERVIEW</span></div> +<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> ========</span></div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> Laser and Missile class</span></div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">*/</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="_mem_debug_8h.html">MemDebug.h</a>"</span></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="_shot_8h.html">Shot.h</a>"</span></div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="_weapon_8h.html">Weapon.h</a>"</span></div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="_drive_sprite_8h.html">DriveSprite.h</a>"</span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="_seeker_a_i_8h.html">SeekerAI.h</a>"</span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "<a class="code" href="_sim_8h.html">Sim.h</a>"</span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "<a class="code" href="_ship_8h.html">Ship.h</a>"</span></div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include "<a class="code" href="_trail_8h.html">Trail.h</a>"</span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="_random_8h.html">Random.h</a>"</span></div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="_audio_config_8h.html">AudioConfig.h</a>"</span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="_terrain_region_8h.html">TerrainRegion.h</a>"</span></div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="_terrain_8h.html">Terrain.h</a>"</span></div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="_game_8h.html">Game.h</a>"</span></div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="_bolt_8h.html">Bolt.h</a>"</span></div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="_sprite_8h.html">Sprite.h</a>"</span></div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="_solid_8h.html">Solid.h</a>"</span></div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="_light_8h.html">Light.h</a>"</span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="_bitmap_8h.html">Bitmap.h</a>"</span></div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "<a class="code" href="_data_loader_8h.html">DataLoader.h</a>"</span></div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "<a class="code" href="_sound_8h.html">Sound.h</a>"</span></div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div> +<div class="line"><a name="l00039"></a><span class="lineno"><a class="code" href="class_shot.html#a192720cd066d3b1e2ca234d4531c5879"> 39</a></span> <a class="code" href="class_shot.html#a192720cd066d3b1e2ca234d4531c5879">Shot::Shot</a>(<span class="keyword">const</span> <a class="code" href="struct_point.html">Point</a>& pos, <span class="keyword">const</span> <a class="code" href="class_camera.html">Camera</a>& shot_cam, <a class="code" href="class_weapon_design.html">WeaponDesign</a>* dsn, <span class="keyword">const</span> <a class="code" href="class_ship.html">Ship</a>* ship)</div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> : first_frame(true), owner(ship), flash(0), flare(0), trail(0), sound(0), eta(0),</div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> charge(1.0f), design(dsn), offset(1.0e5f), altitude_agl(-1.0e6f), hit_target(false)</div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="code" href="class_physical.html#a6c0701c3b48649aab8fa7c4ccd00e21c">obj_type</a> = <a class="code" href="class_sim_object.html#a43f6bd6f43c6e7798b4f7ac729c53982af19ae8c44fb3b12bc78ec664c65116f5">SimObject::SIM_SHOT</a>;</div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="class_shot.html#a1a46dbfd2cab7693188340476d1fcc6f">type</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5a3037767e18e8a675cef7f3c5e19a78">type</a>;</div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a25a23a53c2858aaca44235b3c998e89a">primary</a>;</div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a04c587445da3b085e00c2d0c639f94b9">beam</a>;</div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="class_shot.html#a93f76d8208100062124699689194355b">base_damage</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ac0a098f4619da09066f5ebee76ca5dc0">damage</a>;</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="class_shot.html#aa7d764d05b19b8726737cbb330312e6b">armed</a> = <span class="keyword">false</span>;</div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="code" href="class_physical.html#a339bd272f6c690c23b64eb9419d039ec">radius</a> = 10.0f;</div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a> || <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a86a5d85ebad0ec34066203d47f016738">decoy_type</a> || !<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5e1b5320243042cc8271bc7ac2cfcf4d">guided</a>) {</div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="class_physical.html#ad57f7c28a081079e6c3b1ecd1089e927">straight</a> = <span class="keyword">true</span>;</div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="class_shot.html#aa7d764d05b19b8726737cbb330312e6b">armed</a> = <span class="keyword">true</span>;</div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  }</div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="class_physical.html#ae6b6004183efe4ba25cace4fc3f2fd4d">cam</a>.<a class="code" href="class_camera.html#a04eb689dabc8e56ec6098377d1321942">Clone</a>(shot_cam);</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a67e248c3f9ceb80ba7ce0704bad9990a">life</a>;</div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <a class="code" href="class_physical.html#a02b1afe5e027120d1e8dc445ee80143e">velocity</a> = <a class="code" href="class_physical.html#ae6b6004183efe4ba25cace4fc3f2fd4d">cam</a>.<a class="code" href="class_camera.html#a6767fa21da7413fe049cf64eed98f02f">vpn</a>() * (double) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ab57f6a6fd4483a04b20cdb273629631c">speed</a>;</div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div> +<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <a class="code" href="class_physical.html#aaab110c0381fdc000018c6a65b9ef657">MoveTo</a>(pos);</div> +<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div> +<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>)</div> +<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="class_shot.html#a701985701d6070af28893ae82c0b1af6">origin</a> = pos + (shot_cam.<a class="code" href="class_camera.html#a6767fa21da7413fe049cf64eed98f02f">vpn</a>() * -<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a>);</div> +<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div> +<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">switch</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#afb980c0d6ac8a086779a0fcd7934ffd0">graphic_type</a>) {</div> +<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">case</span> <a class="code" href="class_graphic.html#a560615913229aa332d099fd69d352a14a84504006453a4c1c2af212aa70c59dbd">Graphic::BOLT</a>: {</div> +<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="class_bolt.html">Bolt</a>* s = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_bolt.html">Bolt</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a>, <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a7379a9cf98bdae845f1a1cff2246053c">width</a>, <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a21a062ee914fd1eb13cbdcd4d5e8159f">shot_img</a>, 1);</div> +<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  s-><a class="code" href="class_bolt.html#affd36104d56f359b4a0d77784f40f6a3">SetDirection</a>(<a class="code" href="class_physical.html#ae6b6004183efe4ba25cace4fc3f2fd4d">cam</a>.<a class="code" href="class_camera.html#a6767fa21da7413fe049cf64eed98f02f">vpn</a>());</div> +<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a> = s;</div> +<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div> +<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div> +<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">case</span> <a class="code" href="class_graphic.html#a560615913229aa332d099fd69d352a14ae53dcb65eaea8c73a56329cebc2d6c96">Graphic::SPRITE</a>: {</div> +<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="class_sprite.html">Sprite</a>* s = 0;</div> +<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div> +<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a284f8869d783130bc190c6d0e278b405">animation</a>)</div> +<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  s = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_drive_sprite.html">DriveSprite</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a284f8869d783130bc190c6d0e278b405">animation</a>, <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a387a2319180f203fce125c92a98333e1">anim_length</a>);</div> +<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">else</span></div> +<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  s = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_drive_sprite.html">DriveSprite</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a21a062ee914fd1eb13cbdcd4d5e8159f">shot_img</a>);</div> +<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div> +<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  s-><a class="code" href="class_sprite.html#afe02d5d27a4788993801a6a94ccde875">Scale</a>((<span class="keywordtype">double</span>) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#adb663c96dfe802265e62969e650c2078">scale</a>);</div> +<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a> = s;</div> +<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div> +<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div> +<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">case</span> <a class="code" href="class_graphic.html#a560615913229aa332d099fd69d352a14a409fa0529769024d59f3a0d60e4d764e">Graphic::SOLID</a>: {</div> +<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <a class="code" href="class_solid.html">Solid</a>* s = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_solid.html">Solid</a>;</div> +<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  s-><a class="code" href="class_solid.html#af3523ca7f8df117565e53bd087ae60f7">UseModel</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#aea91d3ca6e899c3a8b8ecf71cc9dc647">shot_model</a>);</div> +<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a> = s;</div> +<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div> +<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="class_physical.html#a339bd272f6c690c23b64eb9419d039ec">radius</a> = <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>-><a class="code" href="class_graphic.html#a523f7cb9e66d36edefc3ec12802da621">Radius</a>();</div> +<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  }</div> +<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">break</span>;</div> +<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  }</div> +<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div> +<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>)</div> +<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>-><a class="code" href="class_graphic.html#af8bec5b637e4925c65fb77d8234fb266">MoveTo</a>(pos);</div> +<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div> +<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="class_physical.html#afd7fa6ca59a6efa5c5bd465793da09a1">light</a> = 0;</div> +<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div> +<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#afc20140bc220c986fb169c4377bfe6ee">light</a> > 0) {</div> +<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="class_physical.html#afd7fa6ca59a6efa5c5bd465793da09a1">light</a> = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_light.html">Light</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#afc20140bc220c986fb169c4377bfe6ee">light</a>);</div> +<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="class_physical.html#afd7fa6ca59a6efa5c5bd465793da09a1">light</a>-><a class="code" href="class_light.html#a59d1607a75a691305f84d2dce1233f6b">SetColor</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ad04083e767beb3841d462aeef3f7bfd6">light_color</a>);</div> +<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div> +<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div> +<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="class_physical.html#a7c68f6e32d5725d6ae0099400f7c0b6e">mass</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5523026c78909b6a65ce5587b64e0fea">mass</a>;</div> +<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="class_physical.html#ac9b8033226e8a1f0757ab8ceb25bb8c9">drag</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a9f253f31f3a19a110b674d7bdd4f9313">drag</a>;</div> +<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="class_physical.html#ab4a9f94781e500cfc2e594d122b23927">thrust</a> = 0.0f;</div> +<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div> +<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <a class="code" href="class_physical.html#aa97e3222a4d7bee7f0a86f0ddfedc729">dr_drg</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ac3a238e1fe4835b98d3cf5814b990f2d">roll_drag</a>;</div> +<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="code" href="class_physical.html#ae0a23449b126a926c741c6dcb8650aaf">dp_drg</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a81b8653de44b3dc2550081f5b05013ec">pitch_drag</a>;</div> +<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <a class="code" href="class_physical.html#a8b54e9624bb79c518e61fde79e18393e">dy_drg</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ac9f8ab6e70c8354bbd0d4a1846513102">yaw_drag</a>;</div> +<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div> +<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="class_physical.html#a6fe4f81f6b9d31efe9fb2da0f9441842">SetAngularRates</a>((<span class="keywordtype">float</span>) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a78a50d7c50c6b0aa4608cce64a148b3d">roll_rate</a>, (<span class="keywordtype">float</span>) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a04c26767ff7a7d82d6805f4ced3594fa">pitch_rate</a>, (<span class="keywordtype">float</span>) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ac8eb1177c8889bec1e155d078870a0bc">yaw_rate</a>);</div> +<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div> +<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#aff221726ebd03e6b01a9bd69d50943b1">flash_img</a> != 0) {</div> +<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a> = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_sprite.html">Sprite</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#aff221726ebd03e6b01a9bd69d50943b1">flash_img</a>);</div> +<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>-><a class="code" href="class_sprite.html#afe02d5d27a4788993801a6a94ccde875">Scale</a>((<span class="keywordtype">double</span>) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a9a50339be800cc2ddb5f1ad4c381f067">flash_scale</a>);</div> +<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>-><a class="code" href="class_graphic.html#af8bec5b637e4925c65fb77d8234fb266">MoveTo</a>(pos - <a class="code" href="class_physical.html#ae6b6004183efe4ba25cace4fc3f2fd4d">cam</a>.<a class="code" href="class_camera.html#a6767fa21da7413fe049cf64eed98f02f">vpn</a>() * <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a>);</div> +<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>-><a class="code" href="class_graphic.html#a1eac3a5cb01a2fae314104d83a6231b1">SetLuminous</a>(<span class="keyword">true</span>);</div> +<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  }</div> +<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div> +<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#aba65fb2fa929feea622b8608a40ee0ba">flare_img</a> != 0) {</div> +<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a> = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_drive_sprite.html">DriveSprite</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#aba65fb2fa929feea622b8608a40ee0ba">flare_img</a>);</div> +<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>-><a class="code" href="class_sprite.html#afe02d5d27a4788993801a6a94ccde875">Scale</a>((<span class="keywordtype">double</span>) <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5352817a81171997e5124339cecc6d38">flare_scale</a>);</div> +<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>-><a class="code" href="class_graphic.html#af8bec5b637e4925c65fb77d8234fb266">MoveTo</a>(pos);</div> +<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div> +<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> +<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a>) {</div> +<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <a class="code" href="class_shot.html#a71a7a40aa9d7a5ed359c34b03a14381b">iff_code</a> = (BYTE) <a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a>-><a class="code" href="class_ship.html#a5e603faf7321fb04d5b306d70ae6b9ca">GetIFF</a>();</div> +<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <a class="code" href="class_sim_observer.html#ae6c9a20e4fd0bcb3590f983a391dd451">Observe</a>((<a class="code" href="class_sim_object.html">SimObject</a>*) <a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a>);</div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div> +<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div> +<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  sprintf_s(<a class="code" href="class_physical.html#a8494a16d51ebf60bba3961b2a9101b8d">name</a>, <span class="stringliteral">"Shot(%s)"</span>, <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2cbf0ba2a43e27203e72ae900f7101cb">name</a>.<a class="code" href="class_text.html#aae848844d712fd439b42fe6fb8d89bd6">data</a>());</div> +<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> }</div> +<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div> +<div class="line"><a name="l00139"></a><span class="lineno"> 139</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div> +<div class="line"><a name="l00141"></a><span class="lineno"><a class="code" href="class_shot.html#a9c3437fd84fa6178a5191ea040e7d837"> 141</a></span> <a class="code" href="class_shot.html#a9c3437fd84fa6178a5191ea040e7d837">Shot::~Shot</a>()</div> +<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> {</div> +<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="_graphic_8h.html#a6cf60e4cf1961361db679c04b7a896ed">GRAPHIC_DESTROY</a>(<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>);</div> +<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="_graphic_8h.html#a6cf60e4cf1961361db679c04b7a896ed">GRAPHIC_DESTROY</a>(<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>);</div> +<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="_graphic_8h.html#a6cf60e4cf1961361db679c04b7a896ed">GRAPHIC_DESTROY</a>(<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>);</div> +<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div> +<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>) {</div> +<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#a552465dbf8072a7afaa70ac3eeafba91">Stop</a>();</div> +<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#a3894275768425881b9d7d7af33651702">Release</a>();</div> +<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  }</div> +<div class="line"><a name="l00151"></a><span class="lineno"> 151</span> }</div> +<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div> +<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div> +<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div> +<div class="line"><a name="l00156"></a><span class="lineno"><a class="code" href="class_shot.html#a811c0609a5d89d9a45f604d5d3386760"> 156</a></span> <a class="code" href="class_shot.html#a811c0609a5d89d9a45f604d5d3386760">Shot::DesignName</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">return</span> <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2cbf0ba2a43e27203e72ae900f7101cb">name</a>;</div> +<div class="line"><a name="l00159"></a><span class="lineno"> 159</span> }</div> +<div class="line"><a name="l00160"></a><span class="lineno"> 160</span> </div> +<div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div> +<div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00164"></a><span class="lineno"><a class="code" href="class_shot.html#a4ea72a69a385e0005fdc128ae99cae58"> 164</a></span> <a class="code" href="class_shot.html#a4ea72a69a385e0005fdc128ae99cae58">Shot::SetCharge</a>(<span class="keywordtype">float</span> c)</div> +<div class="line"><a name="l00165"></a><span class="lineno"> 165</span> {</div> +<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="class_shot.html#abad9a644bfcf98e55e11c664e91532d6">charge</a> = c;</div> +<div class="line"><a name="l00167"></a><span class="lineno"> 167</span> </div> +<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// trim beam life to amount of energy available:</span></div> +<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>)</div> +<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a67e248c3f9ceb80ba7ce0704bad9990a">life</a> * <a class="code" href="class_shot.html#abad9a644bfcf98e55e11c664e91532d6">charge</a> / <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a82136e096d782297651c48d974b24db2">charge</a>;</div> +<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> }</div> +<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div> +<div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00174"></a><span class="lineno"><a class="code" href="class_shot.html#a19c3bf22818a2101f85da50104d18837"> 174</a></span> <a class="code" href="class_shot.html#a19c3bf22818a2101f85da50104d18837">Shot::SetFuse</a>(<span class="keywordtype">double</span> seconds)</div> +<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> {</div> +<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">if</span> (seconds > 0 && !<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>)</div> +<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> = seconds;</div> +<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> }</div> +<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div> +<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> </div> +<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00183"></a><span class="lineno"><a class="code" href="class_shot.html#ab5d5010a6dbeb0f71af8b77aa337ce3c"> 183</a></span> <a class="code" href="class_shot.html#ab5d5010a6dbeb0f71af8b77aa337ce3c">Shot::SeekTarget</a>(<a class="code" href="class_sim_object.html">SimObject</a>* target, <a class="code" href="class_system.html">System</a>* sub)</div> +<div class="line"><a name="l00184"></a><span class="lineno"> 184</span> {</div> +<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a> && !<a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a>) {</div> +<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="class_seeker_a_i.html">SeekerAI</a>* seeker = (<a class="code" href="class_seeker_a_i.html">SeekerAI</a>*) <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>;</div> +<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="class_sim_object.html">SimObject</a>* old_target = seeker-><a class="code" href="class_steer_a_i.html#a040e7cf4500cf0b2ced8f365857bad6b">GetTarget</a>();</div> +<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div> +<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">if</span> (old_target-><a class="code" href="class_physical.html#a2ce9ae48d2e4f4fb434bdc4083746068">Type</a>()==<a class="code" href="class_sim_object.html#a43f6bd6f43c6e7798b4f7ac729c53982a883a4c0d3bae3a294a55a710f8bd7cf4">SimObject::SIM_SHIP</a>) {</div> +<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="class_ship.html">Ship</a>* tgt_ship = (<a class="code" href="class_ship.html">Ship</a>*) old_target;</div> +<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  tgt_ship-><a class="code" href="class_ship.html#a61a6e7ad2fae9f0be15b23885615767c">DropThreat</a>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div> +<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  }</div> +<div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div> +<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keyword">delete</span> <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>;</div> +<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a> = 0;</div> +<div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div> +<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">if</span> (target) {</div> +<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <a class="code" href="class_seeker_a_i.html">SeekerAI</a>* seeker = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_seeker_a_i.html">SeekerAI</a>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  seeker-><a class="code" href="class_seeker_a_i.html#aada879ddd4a693bf4429e75e72148597">SetTarget</a>(target, sub);</div> +<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  seeker-><a class="code" href="class_seeker_a_i.html#a024ad73494e0f30ab45138b2e9d976e7">SetPursuit</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5e1b5320243042cc8271bc7ac2cfcf4d">guided</a>);</div> +<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  seeker-><a class="code" href="class_seeker_a_i.html#a022ed397eaa483a850d2460d961ef0e6">SetDelay</a>(1);</div> +<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div> +<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a> = seeker;</div> +<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> </div> +<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a> && target-><a class="code" href="class_physical.html#a2ce9ae48d2e4f4fb434bdc4083746068">Type</a>()==<a class="code" href="class_sim_object.html#a43f6bd6f43c6e7798b4f7ac729c53982a883a4c0d3bae3a294a55a710f8bd7cf4">SimObject::SIM_SHIP</a>) {</div> +<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <a class="code" href="class_ship.html">Ship</a>* tgt_ship = (<a class="code" href="class_ship.html">Ship</a>*) target;</div> +<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  tgt_ship-><a class="code" href="class_ship.html#abe165ce8724a13a99a4c11522389623a">AddThreat</a>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  }</div> +<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  }</div> +<div class="line"><a name="l00211"></a><span class="lineno"> 211</span> }</div> +<div class="line"><a name="l00212"></a><span class="lineno"> 212</span> </div> +<div class="line"><a name="l00213"></a><span class="lineno"> 213</span> <span class="keywordtype">bool</span></div> +<div class="line"><a name="l00214"></a><span class="lineno"><a class="code" href="class_shot.html#a7ae0b40104aeda14d5948dda703cd013"> 214</a></span> <a class="code" href="class_shot.html#a7ae0b40104aeda14d5948dda703cd013">Shot::IsTracking</a>(<a class="code" href="class_ship.html">Ship</a>* tgt)<span class="keyword"> const</span></div> +<div class="line"><a name="l00215"></a><span class="lineno"> 215</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">return</span> tgt && (<a class="code" href="class_shot.html#aed531d298e2709eea2a3132a2335c7d5">GetTarget</a>() == tgt);</div> +<div class="line"><a name="l00217"></a><span class="lineno"> 217</span> }</div> +<div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div> +<div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <a class="code" href="class_sim_object.html">SimObject</a>*</div> +<div class="line"><a name="l00220"></a><span class="lineno"><a class="code" href="class_shot.html#aed531d298e2709eea2a3132a2335c7d5"> 220</a></span> <a class="code" href="class_shot.html#aed531d298e2709eea2a3132a2335c7d5">Shot::GetTarget</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>) {</div> +<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="class_seeker_a_i.html">SeekerAI</a>* seeker = (<a class="code" href="class_seeker_a_i.html">SeekerAI</a>*) <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>;</div> +<div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div> +<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">if</span> (seeker-><a class="code" href="class_seeker_a_i.html#a00d5f203be5ea0eaab21c99237c15029">GetDelay</a>() <= 0)</div> +<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">return</span> seeker-><a class="code" href="class_steer_a_i.html#a040e7cf4500cf0b2ced8f365857bad6b">GetTarget</a>();</div> +<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div> +<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div> +<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keywordflow">return</span> 0;</div> +<div class="line"><a name="l00230"></a><span class="lineno"> 230</span> }</div> +<div class="line"><a name="l00231"></a><span class="lineno"> 231</span> </div> +<div class="line"><a name="l00232"></a><span class="lineno"> 232</span> <span class="keywordtype">bool</span></div> +<div class="line"><a name="l00233"></a><span class="lineno"><a class="code" href="class_shot.html#a3b60864c63f48493fcb6993656bb52d2"> 233</a></span> <a class="code" href="class_shot.html#a3b60864c63f48493fcb6993656bb52d2">Shot::IsFlak</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">return</span> <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a> && <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a66dbe542bc621ca8be240781f46fcc40">flak</a>;</div> +<div class="line"><a name="l00236"></a><span class="lineno"> 236</span> }</div> +<div class="line"><a name="l00237"></a><span class="lineno"> 237</span> </div> +<div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> </div> +<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="keywordtype">bool</span></div> +<div class="line"><a name="l00241"></a><span class="lineno"><a class="code" href="class_shot.html#a1560099bed275ea09bd6e100df76d1f9"> 241</a></span> <a class="code" href="class_shot.html#a1560099bed275ea09bd6e100df76d1f9">Shot::IsHostileTo</a>(<span class="keyword">const</span> <a class="code" href="class_sim_object.html">SimObject</a>* o)<span class="keyword"> const</span></div> +<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordflow">if</span> (o) {</div> +<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="keywordflow">if</span> (o-><a class="code" href="class_physical.html#a2ce9ae48d2e4f4fb434bdc4083746068">Type</a>() == <a class="code" href="class_sim_object.html#a43f6bd6f43c6e7798b4f7ac729c53982a883a4c0d3bae3a294a55a710f8bd7cf4">SIM_SHIP</a>) {</div> +<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <a class="code" href="class_ship.html">Ship</a>* s = (<a class="code" href="class_ship.html">Ship</a>*) o;</div> +<div class="line"><a name="l00246"></a><span class="lineno"> 246</span> </div> +<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">if</span> (s-><a class="code" href="class_ship.html#acf065374e136b9255857d49b352351af">IsRogue</a>())</div> +<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> +<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> </div> +<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keywordflow">if</span> (s-><a class="code" href="class_ship.html#a5e603faf7321fb04d5b306d70ae6b9ca">GetIFF</a>() > 0 && s-><a class="code" href="class_ship.html#a5e603faf7321fb04d5b306d70ae6b9ca">GetIFF</a>() != <a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2">GetIFF</a>())</div> +<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> +<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  }</div> +<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div> +<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (o-><a class="code" href="class_physical.html#a2ce9ae48d2e4f4fb434bdc4083746068">Type</a>() == <a class="code" href="class_sim_object.html#a43f6bd6f43c6e7798b4f7ac729c53982af19ae8c44fb3b12bc78ec664c65116f5">SIM_SHOT</a> || o-><a class="code" href="class_physical.html#a2ce9ae48d2e4f4fb434bdc4083746068">Type</a>() == <a class="code" href="class_sim_object.html#a43f6bd6f43c6e7798b4f7ac729c53982ae13513f3708d04b53ead6fb2e85facad">SIM_DRONE</a>) {</div> +<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <a class="code" href="class_shot.html">Shot</a>* s = (<a class="code" href="class_shot.html">Shot</a>*) o;</div> +<div class="line"><a name="l00256"></a><span class="lineno"> 256</span> </div> +<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">if</span> (s-><a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2">GetIFF</a>() > 0 && s-><a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2">GetIFF</a>() != <a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2">GetIFF</a>())</div> +<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> +<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  }</div> +<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  }</div> +<div class="line"><a name="l00261"></a><span class="lineno"> 261</span> </div> +<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> +<div class="line"><a name="l00263"></a><span class="lineno"> 263</span> }</div> +<div class="line"><a name="l00264"></a><span class="lineno"> 264</span> </div> +<div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div> +<div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00268"></a><span class="lineno"><a class="code" href="class_shot.html#a4d1e4bc0a638697ad354350ce31c3853"> 268</a></span> <a class="code" href="class_shot.html#a4d1e4bc0a638697ad354350ce31c3853">Shot::ExecFrame</a>(<span class="keywordtype">double</span> seconds)</div> +<div class="line"><a name="l00269"></a><span class="lineno"> 269</span> {</div> +<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a> = -1.0e6f;</div> +<div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div> +<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="comment">// add random flickering effect:</span></div> +<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="keywordtype">double</span> flicker = 0.75 + (double) rand() / 8e4;</div> +<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">if</span> (flicker > 1) flicker = 1;</div> +<div class="line"><a name="l00275"></a><span class="lineno"> 275</span> </div> +<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>) {</div> +<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>-><a class="code" href="class_sprite.html#a15a534530cd8c3d8096ac4d1ea9d25cd">SetShade</a>(flicker);</div> +<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  }</div> +<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>) {</div> +<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <a class="code" href="class_bolt.html">Bolt</a>* blob = (<a class="code" href="class_bolt.html">Bolt</a>*) <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>;</div> +<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  blob-><a class="code" href="class_bolt.html#afd236c3d6b28861d5bda094d465a773b">SetShade</a>(flicker);</div> +<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <a class="code" href="class_shot.html#a685f7a245180e23aad5b7a4153157e0f">offset</a> -= (float) (seconds * 10);</div> +<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div> +<div class="line"><a name="l00284"></a><span class="lineno"> 284</span> </div> +<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">if</span> (<a class="code" href="class_game.html#a7565bb8df0532d4f1ddc82229d13a016">Game::Paused</a>())</div> +<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordflow">return</span>;</div> +<div class="line"><a name="l00287"></a><span class="lineno"> 287</span> </div> +<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>) {</div> +<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_shot.html#a3dd6988fa6b31bb74ece8b5035742a88">first_frame</a>) {</div> +<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> > 0) {</div> +<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> -= seconds;</div> +<div class="line"><a name="l00292"></a><span class="lineno"> 292</span> </div> +<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> < 0)</div> +<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> = 0;</div> +<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  }</div> +<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  }</div> +<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  }</div> +<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <a class="code" href="class_shot.html#a701985701d6070af28893ae82c0b1af6">origin</a> = <a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>();</div> +<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> </div> +<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_shot.html#a3dd6988fa6b31bb74ece8b5035742a88">first_frame</a>)</div> +<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <a class="code" href="class_shot.html#a4d1e4bc0a638697ad354350ce31c3853">Physical::ExecFrame</a>(seconds);</div> +<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="keywordflow">else</span></div> +<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <a class="code" href="class_shot.html#a4d1e4bc0a638697ad354350ce31c3853">Physical::ExecFrame</a>(0);</div> +<div class="line"><a name="l00305"></a><span class="lineno"> 305</span> </div> +<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="keywordtype">double</span> len = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a>;</div> +<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">if</span> (len < 50) len = 50;</div> +<div class="line"><a name="l00308"></a><span class="lineno"> 308</span> </div> +<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a> && <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> > 0 && <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a67e248c3f9ceb80ba7ce0704bad9990a">life</a> - <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> > 0.2) {</div> +<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a3acfbbd0a71c276bad10e4b67e023f59">trail</a>.<a class="code" href="class_text.html#a3dfa250f46fd909c4fe95fc59372838c">length</a>()) {</div> +<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a> = <span class="keyword">new</span>(__FILE__,__LINE__) <a class="code" href="class_trail.html">Trail</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#adcf82d1baa6abc796547168db46cc9b7">trail_img</a>, <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#adb196535dc653e669dff42f042be3625">trail_length</a>);</div> +<div class="line"><a name="l00312"></a><span class="lineno"> 312</span> </div> +<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5ac5c706ced5c5c9e5af579b179f8fbf">trail_width</a> > 0)</div> +<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>-><a class="code" href="class_trail.html#a90ce7c7dfe88c45c53dad893c10ef5da">SetWidth</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a5ac5c706ced5c5c9e5af579b179f8fbf">trail_width</a>);</div> +<div class="line"><a name="l00315"></a><span class="lineno"> 315</span> </div> +<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a397d408624d32722a503f21df69278bd">trail_dim</a> > 0)</div> +<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>-><a class="code" href="class_trail.html#ad02248bdcb5cbfa2b0aca1a956f255cd">SetDim</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a397d408624d32722a503f21df69278bd">trail_dim</a>);</div> +<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> </div> +<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>-><a class="code" href="class_trail.html#adb3cc66dce3422f3e0b905bf38541ff2">AddPoint</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>() + <a class="code" href="class_physical.html#a2fba0c03cbd4afade7da4fc1e5bb0c0b">Heading</a>() * -100);</div> +<div class="line"><a name="l00320"></a><span class="lineno"> 320</span> </div> +<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <a class="code" href="class_scene.html">Scene</a>* scene = 0;</div> +<div class="line"><a name="l00322"></a><span class="lineno"> 322</span> </div> +<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>)</div> +<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  scene = <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>-><a class="code" href="class_graphic.html#ad61de5b90b46c991775d8fc41a9a1538">GetScene</a>();</div> +<div class="line"><a name="l00325"></a><span class="lineno"> 325</span> </div> +<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">if</span> (scene)</div> +<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  scene-><a class="code" href="class_scene.html#a2ef1e98afaf344348e0d58b1a26a3729">AddGraphic</a>(<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>);</div> +<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  }</div> +<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  }</div> +<div class="line"><a name="l00330"></a><span class="lineno"> 330</span> </div> +<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>)</div> +<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>-><a class="code" href="class_trail.html#adb3cc66dce3422f3e0b905bf38541ff2">AddPoint</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> </div> +<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">if</span> (!<a class="code" href="class_shot.html#aa7d764d05b19b8726737cbb330312e6b">armed</a>) {</div> +<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <a class="code" href="class_seeker_a_i.html">SeekerAI</a>* seeker = (<a class="code" href="class_seeker_a_i.html">SeekerAI</a>*) <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>;</div> +<div class="line"><a name="l00336"></a><span class="lineno"> 336</span> </div> +<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <span class="keywordflow">if</span> (seeker && seeker-><a class="code" href="class_seeker_a_i.html#a00d5f203be5ea0eaab21c99237c15029">GetDelay</a>() <= 0)</div> +<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <a class="code" href="class_shot.html#aa7d764d05b19b8726737cbb330312e6b">armed</a> = <span class="keyword">true</span>;</div> +<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  }</div> +<div class="line"><a name="l00340"></a><span class="lineno"> 340</span> </div> +<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="comment">// handle submunitions:</span></div> +<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ac3c0bdb99d8ad8c404fa798d9a2b08a7">det_range</a> > 0 && <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a736b2e63c1f9f33770a1783a5f6aa224">det_count</a> > 0) {</div> +<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a> && !<a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a>) {</div> +<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <a class="code" href="class_seeker_a_i.html">SeekerAI</a>* seeker = (<a class="code" href="class_seeker_a_i.html">SeekerAI</a>*) <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>;</div> +<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <a class="code" href="class_sim_object.html">SimObject</a>* target = seeker-><a class="code" href="class_steer_a_i.html#a040e7cf4500cf0b2ced8f365857bad6b">GetTarget</a>();</div> +<div class="line"><a name="l00346"></a><span class="lineno"> 346</span> </div> +<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="keywordflow">if</span> (target) {</div> +<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keywordtype">double</span> range = <a class="code" href="struct_point.html">Point</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>() - target-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>()).length();</div> +<div class="line"><a name="l00349"></a><span class="lineno"> 349</span> </div> +<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordflow">if</span> (range < design->det_range) {</div> +<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> = 0;</div> +<div class="line"><a name="l00352"></a><span class="lineno"> 352</span> </div> +<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <a class="code" href="class_sim.html">Sim</a>* sim = <a class="code" href="class_sim.html#a14b48a472bca6d04230c789fc4beab4c">Sim::GetSim</a>();</div> +<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" href="class_weapon_design.html">WeaponDesign</a>* child_design = <a class="code" href="class_weapon_design.html#a908097f0b85d2a49cb0dc6b09e078d47">WeaponDesign::Find</a>(<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a7d02f28749749f60d5e8766f0659c2f1">det_child</a>);</div> +<div class="line"><a name="l00355"></a><span class="lineno"> 355</span> </div> +<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <span class="keywordflow">if</span> (sim && child_design) {</div> +<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keywordtype">double</span> spread = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a880b880b74ed7313a3bd6683b1947d89">det_spread</a>;</div> +<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> </div> +<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <a class="code" href="class_camera.html">Camera</a> aim_cam;</div> +<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  aim_cam.<a class="code" href="class_camera.html#a04eb689dabc8e56ec6098377d1321942">Clone</a>(<a class="code" href="class_physical.html#ac6be8bd79bd6622fd67d2d71f8e125af">Cam</a>());</div> +<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  aim_cam.<a class="code" href="class_camera.html#ae0e2c221f049b6259251cac4c44a6c15">LookAt</a>(target-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00362"></a><span class="lineno"> 362</span> </div> +<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a736b2e63c1f9f33770a1783a5f6aa224">det_count</a>; i++) {</div> +<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <a class="code" href="class_shot.html">Shot</a>* child = sim-><a class="code" href="class_sim.html#ace55569939eeb7b9162e0ae144513c75">CreateShot</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>(), aim_cam, child_design,</div> +<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a>, <a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a>-><a class="code" href="class_sim_object.html#aa15b8215840833436f14f22919cf01f5">GetRegion</a>());</div> +<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> </div> +<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  child-><a class="code" href="class_shot.html#a4ea72a69a385e0005fdc128ae99cae58">SetCharge</a>(child_design-><a class="code" href="class_weapon_design.html#a82136e096d782297651c48d974b24db2">charge</a>);</div> +<div class="line"><a name="l00368"></a><span class="lineno"> 368</span> </div> +<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keywordflow">if</span> (child_design-><a class="code" href="class_weapon_design.html#a5e1b5320243042cc8271bc7ac2cfcf4d">guided</a>)</div> +<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  child-><a class="code" href="class_shot.html#ab5d5010a6dbeb0f71af8b77aa337ce3c">SeekTarget</a>(target, seeker-><a class="code" href="class_steer_a_i.html#a157655e15aaf6bc72af66d4a93e61c96">GetSubTarget</a>());</div> +<div class="line"><a name="l00371"></a><span class="lineno"> 371</span> </div> +<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keywordflow">if</span> (child_design-><a class="code" href="class_weapon_design.html#a04c587445da3b085e00c2d0c639f94b9">beam</a>)</div> +<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  child-><a class="code" href="class_shot.html#a4d60ed9eb5ecfbd15c79f5607ee3f218">SetBeamPoints</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>(), target-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00374"></a><span class="lineno"> 374</span> </div> +<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="keywordflow">if</span> (i) aim_cam.<a class="code" href="class_camera.html#ae0e2c221f049b6259251cac4c44a6c15">LookAt</a>(target-><a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  aim_cam.<a class="code" href="class_camera.html#af60842b1cef936d5d1fbf35e3f2ce58c">Pitch</a>(<a class="code" href="_random_8cpp.html#a93eaa94ec1af8703c6427ed5431ec61c">Random</a>(-spread, spread));</div> +<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  aim_cam.<a class="code" href="class_camera.html#ac79dc292c4bbdc2d090646ee37ff0234">Yaw</a>(<a class="code" href="_random_8cpp.html#a93eaa94ec1af8703c6427ed5431ec61c">Random</a>(-spread, spread));</div> +<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  }</div> +<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  }</div> +<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  }</div> +<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  }</div> +<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  }</div> +<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  }</div> +<div class="line"><a name="l00384"></a><span class="lineno"> 384</span> </div> +<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a> && !<a class="code" href="class_shot.html#a3dd6988fa6b31bb74ece8b5035742a88">first_frame</a>)</div> +<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <a class="code" href="_graphic_8h.html#a6cf60e4cf1961361db679c04b7a896ed">GRAPHIC_DESTROY</a>(<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>);</div> +<div class="line"><a name="l00387"></a><span class="lineno"> 387</span> </div> +<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="keywordflow">if</span> (thrust < design-><a class="code" href="class_physical.html#ab4a9f94781e500cfc2e594d122b23927">thrust</a>)</div> +<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  thrust += (float) (seconds * 5.0e3);</div> +<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  <span class="keywordflow">else</span></div> +<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  thrust = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#aa706c025fe6def4792809be2b6764247">thrust</a>;</div> +<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  }</div> +<div class="line"><a name="l00393"></a><span class="lineno"> 393</span> </div> +<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <a class="code" href="class_shot.html#a3dd6988fa6b31bb74ece8b5035742a88">first_frame</a> = 0; </div> +<div class="line"><a name="l00395"></a><span class="lineno"> 395</span> </div> +<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>)</div> +<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>-><a class="code" href="class_graphic.html#af8bec5b637e4925c65fb77d8234fb266">MoveTo</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00398"></a><span class="lineno"> 398</span> }</div> +<div class="line"><a name="l00399"></a><span class="lineno"> 399</span> </div> +<div class="line"><a name="l00400"></a><span class="lineno"> 400</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00401"></a><span class="lineno"> 401</span> </div> +<div class="line"><a name="l00402"></a><span class="lineno"> 402</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00403"></a><span class="lineno"><a class="code" href="class_shot.html#aba65a2dfc22fe35655ddc523e1e6bdbd"> 403</a></span> <a class="code" href="class_shot.html#aba65a2dfc22fe35655ddc523e1e6bdbd">Shot::Disarm</a>()</div> +<div class="line"><a name="l00404"></a><span class="lineno"> 404</span> {</div> +<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aa7d764d05b19b8726737cbb330312e6b">armed</a> && !<a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a>) {</div> +<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <a class="code" href="class_shot.html#aa7d764d05b19b8726737cbb330312e6b">armed</a> = <span class="keyword">false</span>;</div> +<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keyword">delete</span> <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a>;</div> +<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <a class="code" href="class_physical.html#a8ebe4e3afdd856a228135ce30bd9d704">dir</a> = 0;</div> +<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  }</div> +<div class="line"><a name="l00410"></a><span class="lineno"> 410</span> }</div> +<div class="line"><a name="l00411"></a><span class="lineno"> 411</span> </div> +<div class="line"><a name="l00412"></a><span class="lineno"> 412</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00413"></a><span class="lineno"><a class="code" href="class_shot.html#ab9461118feedc62eac82fc6742693769"> 413</a></span> <a class="code" href="class_shot.html#ab9461118feedc62eac82fc6742693769">Shot::Destroy</a>()</div> +<div class="line"><a name="l00414"></a><span class="lineno"> 414</span> {</div> +<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a> = 0;</div> +<div class="line"><a name="l00416"></a><span class="lineno"> 416</span> }</div> +<div class="line"><a name="l00417"></a><span class="lineno"> 417</span> </div> +<div class="line"><a name="l00418"></a><span class="lineno"> 418</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00419"></a><span class="lineno"> 419</span> </div> +<div class="line"><a name="l00420"></a><span class="lineno"> 420</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00421"></a><span class="lineno"><a class="code" href="class_shot.html#a4d60ed9eb5ecfbd15c79f5607ee3f218"> 421</a></span> <a class="code" href="class_shot.html#a4d60ed9eb5ecfbd15c79f5607ee3f218">Shot::SetBeamPoints</a>(<span class="keyword">const</span> <a class="code" href="struct_point.html">Point</a>& from, <span class="keyword">const</span> <a class="code" href="struct_point.html">Point</a>& to)</div> +<div class="line"><a name="l00422"></a><span class="lineno"> 422</span> {</div> +<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>) {</div> +<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <a class="code" href="class_physical.html#aaab110c0381fdc000018c6a65b9ef657">MoveTo</a>(to);</div> +<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <a class="code" href="class_shot.html#a701985701d6070af28893ae82c0b1af6">origin</a> = from;</div> +<div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div> +<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>) {</div> +<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#af785bc3312cea95e18a526189afadb3e">SetLocation</a>(from);</div> +<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  }</div> +<div class="line"><a name="l00430"></a><span class="lineno"> 430</span> </div> +<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keywordflow">if</span> (<a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>) {</div> +<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <a class="code" href="class_bolt.html">Bolt</a>* s = (<a class="code" href="class_bolt.html">Bolt</a>*) <a class="code" href="class_physical.html#a3adbf31fe8d940401e6b12ccb275432e">rep</a>;</div> +<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  s-><a class="code" href="class_bolt.html#a5f18b6e18ba881687396ea4f49504672">SetEndPoints</a>(from, to);</div> +<div class="line"><a name="l00434"></a><span class="lineno"> 434</span> </div> +<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keywordtype">double</span> len = <a class="code" href="struct_point.html">Point</a>(to - from).<a class="code" href="struct_point.html#a8ebcce847b8c214b7351904ce60f5518">length</a>() / 500;</div> +<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  s-><a class="code" href="class_bolt.html#a418161c2c06dcf65179bebf210b6ef4e">SetTextureOffset</a>(<a class="code" href="class_shot.html#a685f7a245180e23aad5b7a4153157e0f">offset</a>, <a class="code" href="class_shot.html#a685f7a245180e23aad5b7a4153157e0f">offset</a> + len);</div> +<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  }</div> +<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  }</div> +<div class="line"><a name="l00439"></a><span class="lineno"> 439</span> </div> +<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>) {</div> +<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>-><a class="code" href="class_graphic.html#af8bec5b637e4925c65fb77d8234fb266">MoveTo</a>(<a class="code" href="class_shot.html#a701985701d6070af28893ae82c0b1af6">origin</a>);</div> +<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  }</div> +<div class="line"><a name="l00443"></a><span class="lineno"> 443</span> }</div> +<div class="line"><a name="l00444"></a><span class="lineno"> 444</span> </div> +<div class="line"><a name="l00445"></a><span class="lineno"> 445</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00446"></a><span class="lineno"> 446</span> </div> +<div class="line"><a name="l00447"></a><span class="lineno"> 447</span> <span class="keywordtype">double</span></div> +<div class="line"><a name="l00448"></a><span class="lineno"><a class="code" href="class_shot.html#a4680d451f39c6dac0d7c89be6489935d"> 448</a></span> <a class="code" href="class_shot.html#a4680d451f39c6dac0d7c89be6489935d">Shot::AltitudeMSL</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00449"></a><span class="lineno"> 449</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <span class="keywordflow">return</span> <a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>().<a class="code" href="struct_point.html#afa38be143ae800e6ad69ce8ed4df62d8">y</a>;</div> +<div class="line"><a name="l00451"></a><span class="lineno"> 451</span> }</div> +<div class="line"><a name="l00452"></a><span class="lineno"> 452</span> </div> +<div class="line"><a name="l00453"></a><span class="lineno"> 453</span> <span class="keywordtype">double</span></div> +<div class="line"><a name="l00454"></a><span class="lineno"><a class="code" href="class_shot.html#a693b65d9ca4a3163ed5ab68d3e934788"> 454</a></span> <a class="code" href="class_shot.html#a693b65d9ca4a3163ed5ab68d3e934788">Shot::AltitudeAGL</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a> < -1000) {</div> +<div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <a class="code" href="class_shot.html">Shot</a>* pThis = (<a class="code" href="class_shot.html">Shot</a>*) <span class="keyword">this</span>; <span class="comment">// cast-away const</span></div> +<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <a class="code" href="struct_point.html">Point</a> loc = <a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>();</div> +<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <a class="code" href="class_terrain.html">Terrain</a>* terrain = <a class="code" href="class_sim_object.html#ad157797b86f44e754880b3115e99ee2b">region</a>-><a class="code" href="class_sim_region.html#a7fa8f1f9c7a3bd663a120c02752fec61">GetTerrain</a>();</div> +<div class="line"><a name="l00460"></a><span class="lineno"> 460</span> </div> +<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keywordflow">if</span> (terrain)</div> +<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  pThis-><a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a> = (float) (loc.<a class="code" href="struct_point.html#afa38be143ae800e6ad69ce8ed4df62d8">y</a> - terrain-><a class="code" href="class_terrain.html#a23567e7f11df8e0885e4729fd7984606">Height</a>(loc.<a class="code" href="struct_point.html#ab99c56589bc8ad5fa5071387110a5bc7">x</a>, loc.<a class="code" href="struct_point.html#a05ba3b1dfcb19430582ae953cbbfbded">z</a>));</div> +<div class="line"><a name="l00463"></a><span class="lineno"> 463</span> </div> +<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="keywordflow">else</span></div> +<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  pThis-><a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a> = (float) loc.<a class="code" href="struct_point.html#afa38be143ae800e6ad69ce8ed4df62d8">y</a>;</div> +<div class="line"><a name="l00466"></a><span class="lineno"> 466</span> </div> +<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  if (!_finite(<a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a>)) {</div> +<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  pThis-><a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a> = 0.0f;</div> +<div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  }</div> +<div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  }</div> +<div class="line"><a name="l00471"></a><span class="lineno"> 471</span> </div> +<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordflow">return</span> <a class="code" href="class_shot.html#aaa10c1a4fb914a8f69cda2d9c1daad05">altitude_agl</a>;</div> +<div class="line"><a name="l00473"></a><span class="lineno"> 473</span> }</div> +<div class="line"><a name="l00474"></a><span class="lineno"> 474</span> </div> +<div class="line"><a name="l00475"></a><span class="lineno"> 475</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00476"></a><span class="lineno"> 476</span> </div> +<div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00478"></a><span class="lineno"><a class="code" href="class_shot.html#acc1bad7eb592e2a08b0a8d34c7c49f24"> 478</a></span> <a class="code" href="class_shot.html#acc1bad7eb592e2a08b0a8d34c7c49f24">Shot::Initialize</a>()</div> +<div class="line"><a name="l00479"></a><span class="lineno"> 479</span> {</div> +<div class="line"><a name="l00480"></a><span class="lineno"> 480</span> }</div> +<div class="line"><a name="l00481"></a><span class="lineno"> 481</span> </div> +<div class="line"><a name="l00482"></a><span class="lineno"> 482</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00483"></a><span class="lineno"> 483</span> </div> +<div class="line"><a name="l00484"></a><span class="lineno"> 484</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00485"></a><span class="lineno"><a class="code" href="class_shot.html#a033bf2b8d9f4fa30ee53e4944727be20"> 485</a></span> <a class="code" href="class_shot.html#a033bf2b8d9f4fa30ee53e4944727be20">Shot::Close</a>()</div> +<div class="line"><a name="l00486"></a><span class="lineno"> 486</span> {</div> +<div class="line"><a name="l00487"></a><span class="lineno"> 487</span> }</div> +<div class="line"><a name="l00488"></a><span class="lineno"> 488</span> </div> +<div class="line"><a name="l00489"></a><span class="lineno"> 489</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00490"></a><span class="lineno"> 490</span> </div> +<div class="line"><a name="l00491"></a><span class="lineno"> 491</span> <span class="keywordtype">double</span></div> +<div class="line"><a name="l00492"></a><span class="lineno"><a class="code" href="class_shot.html#abd298f2cfc98db7e7151f200d695952e"> 492</a></span> <a class="code" href="class_shot.html#abd298f2cfc98db7e7151f200d695952e">Shot::Damage</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00493"></a><span class="lineno"> 493</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <span class="keywordtype">double</span> damage = 0;</div> +<div class="line"><a name="l00495"></a><span class="lineno"> 495</span> </div> +<div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  <span class="comment">// beam damage based on length:</span></div> +<div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>) {</div> +<div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="keywordtype">double</span> fade = 1;</div> +<div class="line"><a name="l00499"></a><span class="lineno"> 499</span> </div> +<div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>) {</div> +<div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  <span class="comment">// linear fade with distance:</span></div> +<div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <span class="keywordtype">double</span> len = <a class="code" href="struct_point.html">Point</a>(<a class="code" href="class_shot.html#a701985701d6070af28893ae82c0b1af6">origin</a> - <a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>()).<a class="code" href="struct_point.html#a8ebcce847b8c214b7351904ce60f5518">length</a>();</div> +<div class="line"><a name="l00503"></a><span class="lineno"> 503</span> </div> +<div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  <span class="keywordflow">if</span> (len > <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ae25cf4d9cbe631579deadcf21a4ad7a7">min_range</a>)</div> +<div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  fade = (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a> - len) / (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a> - <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#ae25cf4d9cbe631579deadcf21a4ad7a7">min_range</a>);</div> +<div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  }</div> +<div class="line"><a name="l00507"></a><span class="lineno"> 507</span> </div> +<div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  damage = <a class="code" href="class_shot.html#a93f76d8208100062124699689194355b">base_damage</a> * <a class="code" href="class_shot.html#abad9a644bfcf98e55e11c664e91532d6">charge</a> * fade * <a class="code" href="class_game.html#ab5b2d0ac9efee1e7576ecd4cc8d105f3">Game::FrameTime</a>();</div> +<div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  }</div> +<div class="line"><a name="l00510"></a><span class="lineno"> 510</span> </div> +<div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="comment">// energy wep damage based on time:</span></div> +<div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#abeb12275ac15a502a3167e388472ac68">primary</a>) {</div> +<div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  damage = <a class="code" href="class_shot.html#a93f76d8208100062124699689194355b">base_damage</a> * <a class="code" href="class_shot.html#abad9a644bfcf98e55e11c664e91532d6">charge</a> * <a class="code" href="class_physical.html#a6b8e2705ced511545378e49b14573fdc">life</a>;</div> +<div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  }</div> +<div class="line"><a name="l00515"></a><span class="lineno"> 515</span> </div> +<div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  <span class="comment">// missile damage is constant:</span></div> +<div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  damage = <a class="code" href="class_shot.html#a93f76d8208100062124699689194355b">base_damage</a> * <a class="code" href="class_shot.html#abad9a644bfcf98e55e11c664e91532d6">charge</a>;</div> +<div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  }</div> +<div class="line"><a name="l00520"></a><span class="lineno"> 520</span> </div> +<div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  <span class="keywordflow">return</span> damage;</div> +<div class="line"><a name="l00522"></a><span class="lineno"> 522</span> }</div> +<div class="line"><a name="l00523"></a><span class="lineno"> 523</span> </div> +<div class="line"><a name="l00524"></a><span class="lineno"> 524</span> <span class="keywordtype">double</span></div> +<div class="line"><a name="l00525"></a><span class="lineno"><a class="code" href="class_shot.html#ab853f7a5b613ba099a0e36614f39215a"> 525</a></span> <a class="code" href="class_shot.html#ab853f7a5b613ba099a0e36614f39215a">Shot::Length</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00526"></a><span class="lineno"> 526</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>)</div> +<div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <span class="keywordflow">return</span> <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a2dd35ad4112be5f5e69c88a78e9bb318">length</a>;</div> +<div class="line"><a name="l00529"></a><span class="lineno"> 529</span> </div> +<div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  <span class="keywordflow">return</span> 500;</div> +<div class="line"><a name="l00531"></a><span class="lineno"> 531</span> } </div> +<div class="line"><a name="l00532"></a><span class="lineno"> 532</span> </div> +<div class="line"><a name="l00533"></a><span class="lineno"> 533</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00534"></a><span class="lineno"> 534</span> </div> +<div class="line"><a name="l00535"></a><span class="lineno"> 535</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00536"></a><span class="lineno"><a class="code" href="class_shot.html#a87f690dcdc01385c33e1c26a9cf151bf"> 536</a></span> <a class="code" href="class_shot.html#a87f690dcdc01385c33e1c26a9cf151bf">Shot::Activate</a>(<a class="code" href="class_scene.html">Scene</a>& scene)</div> +<div class="line"><a name="l00537"></a><span class="lineno"> 537</span> {</div> +<div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <a class="code" href="class_shot.html#a87f690dcdc01385c33e1c26a9cf151bf">SimObject::Activate</a>(scene);</div> +<div class="line"><a name="l00539"></a><span class="lineno"> 539</span> </div> +<div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>)</div> +<div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  scene.<a class="code" href="class_scene.html#a2ef1e98afaf344348e0d58b1a26a3729">AddGraphic</a>(<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>);</div> +<div class="line"><a name="l00542"></a><span class="lineno"> 542</span> </div> +<div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>)</div> +<div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  scene.<a class="code" href="class_scene.html#a2ef1e98afaf344348e0d58b1a26a3729">AddGraphic</a>(<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>);</div> +<div class="line"><a name="l00545"></a><span class="lineno"> 545</span> </div> +<div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>)</div> +<div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  scene.<a class="code" href="class_scene.html#a2ef1e98afaf344348e0d58b1a26a3729">AddGraphic</a>(<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>);</div> +<div class="line"><a name="l00548"></a><span class="lineno"> 548</span> </div> +<div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a3dd6988fa6b31bb74ece8b5035742a88">first_frame</a>) {</div> +<div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a6bc3a31ffaacdf17ea19913ffd61c1ee">sound_resource</a>) {</div> +<div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a> = <a class="code" href="class_shot.html#ae5f9e7482d41b8558c4b9b8ae1b55de6">design</a>-><a class="code" href="class_weapon_design.html#a6bc3a31ffaacdf17ea19913ffd61c1ee">sound_resource</a>-><a class="code" href="class_sound.html#a0c637966828cf1c533e2e81777e3db28">Duplicate</a>();</div> +<div class="line"><a name="l00552"></a><span class="lineno"> 552</span> </div> +<div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>) {</div> +<div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  <span class="keywordtype">long</span> max_vol = <a class="code" href="class_audio_config.html#a97ed1baee55fd31f1fac4a784b67d9b7">AudioConfig::EfxVolume</a>();</div> +<div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  <span class="keywordtype">long</span> volume = -1000;</div> +<div class="line"><a name="l00556"></a><span class="lineno"> 556</span> </div> +<div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <span class="keywordflow">if</span> (volume > max_vol)</div> +<div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  volume = max_vol;</div> +<div class="line"><a name="l00559"></a><span class="lineno"> 559</span> </div> +<div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#ab72b38209efe41d13fff5865cdc898b8">beam</a>) {</div> +<div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#af785bc3312cea95e18a526189afadb3e">SetLocation</a>(<a class="code" href="class_shot.html#a701985701d6070af28893ae82c0b1af6">origin</a>);</div> +<div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#a2efe8c781dd8e065d5cd1cd70e361b7e">SetVolume</a>(volume);</div> +<div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#ae24d17b1583f2080589eb91d350106fc">Play</a>();</div> +<div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  }</div> +<div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#af785bc3312cea95e18a526189afadb3e">SetLocation</a>(<a class="code" href="class_physical.html#a18d7b806f29edde8af178ae9a6d0ad90">Location</a>());</div> +<div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#a2efe8c781dd8e065d5cd1cd70e361b7e">SetVolume</a>(volume);</div> +<div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a>-><a class="code" href="class_sound.html#ae24d17b1583f2080589eb91d350106fc">Play</a>();</div> +<div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <a class="code" href="class_shot.html#af5c0cf9b4ae72fe7af65b32e972f6aad">sound</a> = 0; <span class="comment">// fire and forget:</span></div> +<div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  }</div> +<div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  }</div> +<div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  }</div> +<div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  }</div> +<div class="line"><a name="l00574"></a><span class="lineno"> 574</span> }</div> +<div class="line"><a name="l00575"></a><span class="lineno"> 575</span> </div> +<div class="line"><a name="l00576"></a><span class="lineno"> 576</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00577"></a><span class="lineno"> 577</span> </div> +<div class="line"><a name="l00578"></a><span class="lineno"> 578</span> <span class="keywordtype">void</span></div> +<div class="line"><a name="l00579"></a><span class="lineno"><a class="code" href="class_shot.html#a5f408057c6a8c604be1ced01947a61fe"> 579</a></span> <a class="code" href="class_shot.html#a5f408057c6a8c604be1ced01947a61fe">Shot::Deactivate</a>(<a class="code" href="class_scene.html">Scene</a>& scene)</div> +<div class="line"><a name="l00580"></a><span class="lineno"> 580</span> {</div> +<div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  <a class="code" href="class_shot.html#a5f408057c6a8c604be1ced01947a61fe">SimObject::Deactivate</a>(scene);</div> +<div class="line"><a name="l00582"></a><span class="lineno"> 582</span> </div> +<div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>)</div> +<div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  scene.<a class="code" href="class_scene.html#a34357a38e17276d4eba0dcc241a74438">DelGraphic</a>(<a class="code" href="class_shot.html#a856d5f418f8b061c624aa9844d7a2a0e">trail</a>);</div> +<div class="line"><a name="l00585"></a><span class="lineno"> 585</span> </div> +<div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>)</div> +<div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  scene.<a class="code" href="class_scene.html#a34357a38e17276d4eba0dcc241a74438">DelGraphic</a>(<a class="code" href="class_shot.html#a1bfe46e21ad38496aab8ad7e920527a2">flash</a>);</div> +<div class="line"><a name="l00588"></a><span class="lineno"> 588</span> </div> +<div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  <span class="keywordflow">if</span> (<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>)</div> +<div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  scene.<a class="code" href="class_scene.html#a34357a38e17276d4eba0dcc241a74438">DelGraphic</a>(<a class="code" href="class_shot.html#aa2a4256f0449fe386192ce64ccaf80f8">flare</a>);</div> +<div class="line"><a name="l00591"></a><span class="lineno"> 591</span> }</div> +<div class="line"><a name="l00592"></a><span class="lineno"> 592</span> </div> +<div class="line"><a name="l00593"></a><span class="lineno"> 593</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00594"></a><span class="lineno"> 594</span> </div> +<div class="line"><a name="l00595"></a><span class="lineno"> 595</span> <span class="keywordtype">int</span></div> +<div class="line"><a name="l00596"></a><span class="lineno"><a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2"> 596</a></span> <a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2">Shot::GetIFF</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00597"></a><span class="lineno"> 597</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  <span class="keywordflow">return</span> <a class="code" href="class_shot.html#a71a7a40aa9d7a5ed359c34b03a14381b">iff_code</a>;</div> +<div class="line"><a name="l00599"></a><span class="lineno"> 599</span> }</div> +<div class="line"><a name="l00600"></a><span class="lineno"> 600</span> </div> +<div class="line"><a name="l00601"></a><span class="lineno"> 601</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00602"></a><span class="lineno"> 602</span> </div> +<div class="line"><a name="l00603"></a><span class="lineno"> 603</span> <a class="code" href="class_color.html">Color</a></div> +<div class="line"><a name="l00604"></a><span class="lineno"><a class="code" href="class_shot.html#aa9be380dfc52d702f991b5a19366cb86"> 604</a></span> <a class="code" href="class_shot.html#aa9be380dfc52d702f991b5a19366cb86">Shot::MarkerColor</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00605"></a><span class="lineno"> 605</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <span class="keywordflow">return</span> <a class="code" href="class_ship.html#a0d3861128ef2694f196443f4fe8b08b4">Ship::IFFColor</a>(<a class="code" href="class_shot.html#af080b22214cb3ee405ec8ae7dacac5d2">GetIFF</a>());</div> +<div class="line"><a name="l00607"></a><span class="lineno"> 607</span> }</div> +<div class="line"><a name="l00608"></a><span class="lineno"> 608</span> </div> +<div class="line"><a name="l00609"></a><span class="lineno"> 609</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00610"></a><span class="lineno"> 610</span> </div> +<div class="line"><a name="l00611"></a><span class="lineno"> 611</span> <span class="keyword">const</span> <span class="keywordtype">char</span>*</div> +<div class="line"><a name="l00612"></a><span class="lineno"><a class="code" href="class_shot.html#a1aaa70627f3763d14c46a4b9ea4c8852"> 612</a></span> <a class="code" href="class_shot.html#a1aaa70627f3763d14c46a4b9ea4c8852">Shot::GetObserverName</a>()<span class="keyword"> const</span></div> +<div class="line"><a name="l00613"></a><span class="lineno"> 613</span> <span class="keyword"></span>{</div> +<div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  <span class="keywordflow">return</span> <a class="code" href="class_physical.html#a8494a16d51ebf60bba3961b2a9101b8d">name</a>;</div> +<div class="line"><a name="l00615"></a><span class="lineno"> 615</span> }</div> +<div class="line"><a name="l00616"></a><span class="lineno"> 616</span> </div> +<div class="line"><a name="l00617"></a><span class="lineno"> 617</span> <span class="comment">// +--------------------------------------------------------------------+</span></div> +<div class="line"><a name="l00618"></a><span class="lineno"> 618</span> </div> +<div class="line"><a name="l00619"></a><span class="lineno"> 619</span> <span class="keywordtype">bool</span></div> +<div class="line"><a name="l00620"></a><span class="lineno"><a class="code" href="class_shot.html#a7d46c99d869aa82b2001df8391906206"> 620</a></span> <a class="code" href="class_shot.html#a7d46c99d869aa82b2001df8391906206">Shot::Update</a>(<a class="code" href="class_sim_object.html">SimObject</a>* obj)</div> +<div class="line"><a name="l00621"></a><span class="lineno"> 621</span> {</div> +<div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <span class="keywordflow">if</span> (obj == (<a class="code" href="class_sim_object.html">SimObject</a>*) <a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a>)</div> +<div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  <a class="code" href="class_shot.html#aebea0f1638734cfa59101ab1a2ddf3ef">owner</a> = 0;</div> +<div class="line"><a name="l00624"></a><span class="lineno"> 624</span> </div> +<div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <span class="keywordflow">return</span> <a class="code" href="class_shot.html#a7d46c99d869aa82b2001df8391906206">SimObserver::Update</a>(obj);</div> +<div class="line"><a name="l00626"></a><span class="lineno"> 626</span> }</div> +</div><!-- fragment --></div><!-- contents --> +</div><!-- doc-content --> +<!-- start footer part --> +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> + <ul> + <li class="navelem"><a class="el" href="dir_ea1b58c809a5070716d7c602998a95b0.html">Stars45</a></li><li class="navelem"><a class="el" href="_shot_8cpp.html">Shot.cpp</a></li> + <li class="footer">Generated on Tue Jun 5 2012 20:47:11 for Starshatter_Open by + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 </li> + </ul> +</div> +</body> +</html> |