PF_setmodel Also sets mins and maxs for inline bmodels.
(edict_t ent, String name)
| 101 | * Also sets mins and maxs for inline bmodels. |
| 102 | */ |
| 103 | public void PF_setmodel(edict_t ent, String name) { |
| 104 | |
| 105 | if (name == null) { |
| 106 | Com.DPrintf( "Error: SV_GAME.PF_setmodel: name is null"); |
| 107 | return; |
| 108 | } |
| 109 | |
| 110 | ent.s.modelindex = SV_FindIndex(name, Defines.CS_MODELS, Defines.MAX_MODELS, true); |
| 111 | |
| 112 | // if it is an inline model, get the size information for it |
| 113 | if (name.startsWith("*")) { |
| 114 | cmodel_t mod = gameImports.cm.InlineModel(name); |
| 115 | Math3D.VectorCopy(mod.mins, ent.mins); |
| 116 | Math3D.VectorCopy(mod.maxs, ent.maxs); |
| 117 | SV_WORLD.SV_LinkEdict(ent, gameImports); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * Change i-th configstring to 'val' and multicast it to everyone reliably |
no test coverage detected