]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/weapons/weapon/electro.qc
Accept hash changes (entity indices)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / electro.qc
1 #ifndef IMPLEMENTATION
2 CLASS(Electro, Weapon)
3 /* ammotype  */ ATTRIB(Electro, ammo_field, .int, ammo_cells)
4 /* impulse   */ ATTRIB(Electro, impulse, int, 5)
5 /* flags     */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
6 /* rating    */ ATTRIB(Electro, bot_pickupbasevalue, float, BOT_PICKUP_RATING_MID);
7 /* color     */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
8 /* modelname */ ATTRIB(Electro, mdl, string, "electro");
9 #ifndef MENUQC
10 /* model     */ ATTRIB(Electro, m_model, Model, MDL_ELECTRO_ITEM);
11 #endif
12 /* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
13 /* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
14 /* wepimg    */ ATTRIB(Electro, model2, string, "weaponelectro");
15 /* refname   */ ATTRIB(Electro, netname, string, "electro");
16 /* wepname   */ ATTRIB(Electro, m_name, string, _("Electro"));
17
18 #define X(BEGIN, P, END, class, prefix) \
19         BEGIN(class) \
20                 P(class, prefix, ammo, float, BOTH) \
21                 P(class, prefix, animtime, float, BOTH) \
22                 P(class, prefix, bouncefactor, float, SEC) \
23                 P(class, prefix, bouncestop, float, SEC) \
24                 P(class, prefix, comboradius, float, PRI) \
25                 P(class, prefix, combo_comboradius, float, NONE) \
26                 P(class, prefix, combo_comboradius_thruwall, float, NONE) \
27                 P(class, prefix, combo_damage, float, NONE) \
28                 P(class, prefix, combo_edgedamage, float, NONE) \
29                 P(class, prefix, combo_force, float, NONE) \
30                 P(class, prefix, combo_radius, float, NONE) \
31                 P(class, prefix, combo_safeammocheck, float, NONE) \
32                 P(class, prefix, combo_speed, float, NONE) \
33                 P(class, prefix, count, float, SEC) \
34                 P(class, prefix, damagedbycontents, float, SEC) \
35                 P(class, prefix, damageforcescale, float, SEC) \
36                 P(class, prefix, damage, float, BOTH) \
37                 P(class, prefix, edgedamage, float, BOTH) \
38                 P(class, prefix, force, float, BOTH) \
39                 P(class, prefix, health, float, SEC) \
40                 P(class, prefix, lifetime, float, BOTH) \
41                 P(class, prefix, midaircombo_explode, float, PRI) \
42                 P(class, prefix, midaircombo_interval, float, PRI) \
43                 P(class, prefix, midaircombo_radius, float, PRI) \
44                 P(class, prefix, radius, float, BOTH) \
45                 P(class, prefix, refire2, float, SEC) \
46                 P(class, prefix, refire, float, BOTH) \
47                 P(class, prefix, reload_ammo, float, NONE) \
48                 P(class, prefix, reload_time, float, NONE) \
49                 P(class, prefix, speed, float, BOTH) \
50                 P(class, prefix, speed_up, float, SEC) \
51                 P(class, prefix, speed_z, float, SEC) \
52                 P(class, prefix, spread, float, BOTH) \
53                 P(class, prefix, switchdelay_drop, float, NONE) \
54                 P(class, prefix, switchdelay_raise, float, NONE) \
55                 P(class, prefix, touchexplode, float, SEC) \
56                 P(class, prefix, weaponreplace, string,NONE) \
57                 P(class, prefix, weaponstartoverride, float, NONE) \
58                 P(class, prefix, weaponstart, float, NONE) \
59                 P(class, prefix, weaponthrowable, float, NONE) \
60         END()
61         W_PROPS(X, Electro, electro)
62 #undef X
63
64 ENDCLASS(Electro)
65 REGISTER_WEAPON(ELECTRO, electro, NEW(Electro));
66
67
68 #ifdef SVQC
69 .float electro_count;
70 .float electro_secondarytime;
71 void W_Electro_ExplodeCombo();
72 #endif
73 #endif
74 #ifdef IMPLEMENTATION
75 #ifdef SVQC
76 spawnfunc(weapon_electro) { weapon_defaultspawnfunc(this, WEP_ELECTRO); }
77
78 void W_Electro_TriggerCombo(vector org, float rad, entity own)
79 {
80         entity e = WarpZone_FindRadius(org, rad, !WEP_CVAR(electro, combo_comboradius_thruwall));
81         while(e)
82         {
83                 if(e.classname == "electro_orb")
84                 {
85                         // do we allow thruwall triggering?
86                         if(WEP_CVAR(electro, combo_comboradius_thruwall))
87                         {
88                                 // if distance is greater than thruwall distance, check to make sure it's not through a wall
89                                 if(vdist(e.WarpZone_findradius_dist, >, WEP_CVAR(electro, combo_comboradius_thruwall)))
90                                 {
91                                         WarpZone_TraceLine(org, e.origin, MOVE_NOMONSTERS, e);
92                                         if(trace_fraction != 1)
93                                         {
94                                                 // trigger is through a wall and outside of thruwall range, abort
95                                                 e = e.chain;
96                                                 continue;
97                                         }
98                                 }
99                         }
100
101                         // change owner to whoever caused the combo explosion
102                         e.realowner = own;
103                         e.takedamage = DAMAGE_NO;
104                         e.classname = "electro_orb_chain";
105
106                         // now set the next one to trigger as well
107                         e.think = W_Electro_ExplodeCombo;
108
109                         // delay combo chains, looks cooler
110                         e.nextthink =
111                                 (
112                                         time
113                                         +
114                                         (WEP_CVAR(electro, combo_speed) ?
115                                                 (vlen(e.WarpZone_findradius_dist) / WEP_CVAR(electro, combo_speed))
116                                                 :
117                                                 0
118                                         )
119                                 );
120                 }
121                 e = e.chain;
122         }
123 }
124
125 void W_Electro_ExplodeCombo()
126 {SELFPARAM();
127         W_Electro_TriggerCombo(self.origin, WEP_CVAR(electro, combo_comboradius), self.realowner);
128
129         self.event_damage = func_null;
130
131         RadiusDamage(
132                 self,
133                 self.realowner,
134                 WEP_CVAR(electro, combo_damage),
135                 WEP_CVAR(electro, combo_edgedamage),
136                 WEP_CVAR(electro, combo_radius),
137                 world,
138                 world,
139                 WEP_CVAR(electro, combo_force),
140                 WEP_ELECTRO.m_id | HITTYPE_BOUNCE, // use THIS type for a combo because primary can't bounce
141                 world
142         );
143
144         remove(self);
145 }
146
147 void W_Electro_Explode()
148 {SELFPARAM();
149         if(other.takedamage == DAMAGE_AIM)
150                 if(IS_PLAYER(other))
151                         if(DIFF_TEAM(self.realowner, other))
152                                 if(!IS_DEAD(other))
153                                         if(IsFlying(other))
154                                                 Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
155
156         self.event_damage = func_null;
157         self.takedamage = DAMAGE_NO;
158
159         if(self.movetype == MOVETYPE_BOUNCE)
160         {
161                 RadiusDamage(
162                         self,
163                         self.realowner,
164                         WEP_CVAR_SEC(electro, damage),
165                         WEP_CVAR_SEC(electro, edgedamage),
166                         WEP_CVAR_SEC(electro, radius),
167                         world,
168                         world,
169                         WEP_CVAR_SEC(electro, force),
170                         self.projectiledeathtype,
171                         other
172                 );
173         }
174         else
175         {
176                 W_Electro_TriggerCombo(self.origin, WEP_CVAR_PRI(electro, comboradius), self.realowner);
177                 RadiusDamage(
178                         self,
179                         self.realowner,
180                         WEP_CVAR_PRI(electro, damage),
181                         WEP_CVAR_PRI(electro, edgedamage),
182                         WEP_CVAR_PRI(electro, radius),
183                         world,
184                         world,
185                         WEP_CVAR_PRI(electro, force),
186                         self.projectiledeathtype,
187                         other
188                 );
189         }
190
191         remove(self);
192 }
193
194 void W_Electro_TouchExplode()
195 {
196         PROJECTILE_TOUCH;
197         W_Electro_Explode();
198 }
199
200 void W_Electro_Bolt_Think()
201 {SELFPARAM();
202         if(time >= self.ltime)
203         {
204                 self.use();
205                 return;
206         }
207
208         if(WEP_CVAR_PRI(electro, midaircombo_radius))
209         {
210                 float found = 0;
211                 entity e = WarpZone_FindRadius(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), true);
212
213                 // loop through nearby orbs and trigger them
214                 while(e)
215                 {
216                         if(e.classname == "electro_orb")
217                         {
218                                 // change owner to whoever caused the combo explosion
219                                 e.realowner = self.realowner;
220                                 e.takedamage = DAMAGE_NO;
221                                 e.classname = "electro_orb_chain";
222
223                                 // now set the next one to trigger as well
224                                 e.think = W_Electro_ExplodeCombo;
225
226                                 // delay combo chains, looks cooler
227                                 e.nextthink =
228                                         (
229                                                 time
230                                                 +
231                                                 (WEP_CVAR(electro, combo_speed) ?
232                                                         (vlen(e.WarpZone_findradius_dist) / WEP_CVAR(electro, combo_speed))
233                                                         :
234                                                         0
235                                                 )
236                                         );
237
238                                 ++found;
239                         }
240                         e = e.chain;
241                 }
242
243                 // if we triggered an orb, should we explode? if not, lets try again next time
244                 if(found && WEP_CVAR_PRI(electro, midaircombo_explode))
245                         { self.use(); }
246                 else
247                         { self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime); }
248         }
249         else { self.nextthink = self.ltime; }
250 }
251
252 void W_Electro_Attack_Bolt(Weapon thiswep)
253 {SELFPARAM();
254         entity proj;
255
256         W_DecreaseAmmo(thiswep, self, WEP_CVAR_PRI(electro, ammo));
257
258         W_SetupShot_ProjectileSize(
259                 self,
260                 '0 0 -3',
261                 '0 0 -3',
262                 false,
263                 2,
264                 SND(ELECTRO_FIRE),
265                 CH_WEAPON_A,
266                 WEP_CVAR_PRI(electro, damage)
267         );
268
269         Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
270
271         proj = new(electro_bolt);
272         proj.owner = proj.realowner = self;
273         proj.bot_dodge = true;
274         proj.bot_dodgerating = WEP_CVAR_PRI(electro, damage);
275         proj.use = W_Electro_Explode;
276         proj.think = W_Electro_Bolt_Think;
277         proj.nextthink = time;
278         proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
279         PROJECTILE_MAKETRIGGER(proj);
280         proj.projectiledeathtype = WEP_ELECTRO.m_id;
281         setorigin(proj, w_shotorg);
282
283         proj.movetype = MOVETYPE_FLY;
284         W_SetupProjVelocity_PRI(proj, electro);
285         proj.angles = vectoangles(proj.velocity);
286         proj.touch = W_Electro_TouchExplode;
287         setsize(proj, '0 0 -3', '0 0 -3');
288         proj.flags = FL_PROJECTILE;
289         proj.missile_flags = MIF_SPLASH;
290
291         CSQCProjectile(proj, true, PROJECTILE_ELECTRO_BEAM, true);
292
293         MUTATOR_CALLHOOK(EditProjectile, self, proj);
294 }
295
296 void W_Electro_Orb_Touch()
297 {SELFPARAM();
298         PROJECTILE_TOUCH;
299         if(other.takedamage == DAMAGE_AIM)
300                 { if(WEP_CVAR_SEC(electro, touchexplode)) { W_Electro_Explode(); } }
301         else
302         {
303                 //UpdateCSQCProjectile(self);
304                 spamsound(self, CH_SHOTS, SND(ELECTRO_BOUNCE), VOL_BASE, ATTEN_NORM);
305                 self.projectiledeathtype |= HITTYPE_BOUNCE;
306         }
307 }
308
309 void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
310 {
311         if(this.health <= 0)
312                 return;
313
314         // note: combos are usually triggered by W_Electro_TriggerCombo, not damage
315         float is_combo = (inflictor.classname == "electro_orb_chain" || inflictor.classname == "electro_bolt");
316
317         if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, (is_combo ? 1 : -1)))
318                 return; // g_projectiles_damage says to halt
319
320         this.health = this.health - damage;
321         if(this.health <= 0)
322         {
323                 this.takedamage = DAMAGE_NO;
324                 this.nextthink = time;
325                 if(is_combo)
326                 {
327                         // change owner to whoever caused the combo explosion
328                         this.realowner = inflictor.realowner;
329                         this.classname = "electro_orb_chain";
330                         this.think = W_Electro_ExplodeCombo;
331                         this.nextthink = time +
332                                 (
333                                         // bound the length, inflictor may be in a galaxy far far away (warpzones)
334                                         min(
335                                                 WEP_CVAR(electro, combo_radius),
336                                                 vlen(this.origin - inflictor.origin)
337                                         )
338                                         /
339                                         // delay combo chains, looks cooler
340                                         WEP_CVAR(electro, combo_speed)
341                                 );
342                 }
343                 else
344                 {
345                         this.use = W_Electro_Explode;
346                         this.think = adaptor_think2use; // not _hittype_splash, as this runs "immediately"
347                 }
348         }
349 }
350
351 void W_Electro_Attack_Orb(Weapon thiswep)
352 {SELFPARAM();
353         W_DecreaseAmmo(thiswep, self, WEP_CVAR_SEC(electro, ammo));
354
355         W_SetupShot_ProjectileSize(
356                 self,
357                 '0 0 -4',
358                 '0 0 -4',
359                 false,
360                 2,
361                 SND(ELECTRO_FIRE2),
362                 CH_WEAPON_A,
363                 WEP_CVAR_SEC(electro, damage)
364         );
365
366         w_shotdir = v_forward; // no TrueAim for grenades please
367
368         Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
369
370         entity proj = new(electro_orb);
371         proj.owner = proj.realowner = self;
372         proj.use = W_Electro_Explode;
373         proj.think = adaptor_think2use_hittype_splash;
374         proj.bot_dodge = true;
375         proj.bot_dodgerating = WEP_CVAR_SEC(electro, damage);
376         proj.nextthink = time + WEP_CVAR_SEC(electro, lifetime);
377         PROJECTILE_MAKETRIGGER(proj);
378         proj.projectiledeathtype = WEP_ELECTRO.m_id | HITTYPE_SECONDARY;
379         setorigin(proj, w_shotorg);
380
381         //proj.glow_size = 50;
382         //proj.glow_color = 45;
383         proj.movetype = MOVETYPE_BOUNCE;
384         W_SetupProjVelocity_UP_SEC(proj, electro);
385         proj.touch = W_Electro_Orb_Touch;
386         setsize(proj, '0 0 -4', '0 0 -4');
387         proj.takedamage = DAMAGE_YES;
388         proj.damageforcescale = WEP_CVAR_SEC(electro, damageforcescale);
389         proj.health = WEP_CVAR_SEC(electro, health);
390         proj.event_damage = W_Electro_Orb_Damage;
391         proj.flags = FL_PROJECTILE;
392         proj.damagedbycontents = (WEP_CVAR_SEC(electro, damagedbycontents));
393
394         proj.bouncefactor = WEP_CVAR_SEC(electro, bouncefactor);
395         proj.bouncestop = WEP_CVAR_SEC(electro, bouncestop);
396         proj.missile_flags = MIF_SPLASH | MIF_ARC;
397
398 #if 0
399         entity p2;
400         p2 = spawn();
401         copyentity(proj, p2);
402         setmodel(p2, MDL_PROJECTILE_ELECTRO);
403         setsize(p2, proj.mins, proj.maxs);
404 #endif
405
406         CSQCProjectile(proj, true, PROJECTILE_ELECTRO, false); // no culling, it has sound
407
408         MUTATOR_CALLHOOK(EditProjectile, self, proj);
409 }
410
411 void W_Electro_CheckAttack(Weapon thiswep, entity actor, .entity weaponentity, int fire)
412 {SELFPARAM();
413         if(self.electro_count > 1)
414         if(PHYS_INPUT_BUTTON_ATCK2(self))
415         if(weapon_prepareattack(thiswep, actor, weaponentity, true, -1))
416         {
417                 W_Electro_Attack_Orb(WEP_ELECTRO);
418                 self.electro_count -= 1;
419                 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
420                 return;
421         }
422         // WEAPONTODO: when the player releases the button, cut down the length of refire2?
423         w_ready(thiswep, actor, weaponentity, fire);
424 }
425
426 .float bot_secondary_electromooth;
427
428 METHOD(Electro, wr_aim, void(entity thiswep))
429 {
430     PHYS_INPUT_BUTTON_ATCK(self) = PHYS_INPUT_BUTTON_ATCK2(self) = false;
431     if(vdist(self.origin - self.enemy.origin, >, 1000)) { self.bot_secondary_electromooth = 0; }
432     if(self.bot_secondary_electromooth == 0)
433     {
434         float shoot;
435
436         if(WEP_CVAR_PRI(electro, speed))
437             shoot = bot_aim(WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), false);
438         else
439             shoot = bot_aim(1000000, 0, 0.001, false);
440
441         if(shoot)
442         {
443             PHYS_INPUT_BUTTON_ATCK(self) = true;
444             if(random() < 0.01) self.bot_secondary_electromooth = 1;
445         }
446     }
447     else
448     {
449         if(bot_aim(WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), true))
450         {
451             PHYS_INPUT_BUTTON_ATCK2(self) = true;
452             if(random() < 0.03) self.bot_secondary_electromooth = 0;
453         }
454     }
455 }
456 METHOD(Electro, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
457 {
458     if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO
459     {
460         float ammo_amount = 0;
461         if(actor.clip_load >= WEP_CVAR_PRI(electro, ammo))
462             ammo_amount = 1;
463         if(actor.clip_load >= WEP_CVAR_SEC(electro, ammo))
464             ammo_amount += 1;
465
466         if(!ammo_amount)
467         {
468             thiswep.wr_reload(thiswep, actor, weaponentity);
469             return;
470         }
471     }
472
473     if(fire & 1)
474     {
475         if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire)))
476         {
477                 W_Electro_Attack_Bolt(thiswep);
478                 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
479         }
480     }
481     else if(fire & 2)
482     {
483         if(time >= actor.electro_secondarytime)
484         if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(electro, refire)))
485         {
486             W_Electro_Attack_Orb(thiswep);
487             actor.electro_count = WEP_CVAR_SEC(electro, count);
488             weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
489             actor.electro_secondarytime = time + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor();
490         }
491     }
492 }
493 METHOD(Electro, wr_checkammo1, bool(entity thiswep))
494 {
495     float ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR_PRI(electro, ammo);
496     ammo_amount += self.(weapon_load[WEP_ELECTRO.m_id]) >= WEP_CVAR_PRI(electro, ammo);
497     return ammo_amount;
498 }
499 METHOD(Electro, wr_checkammo2, bool(entity thiswep))
500 {
501     float ammo_amount;
502     if(WEP_CVAR(electro, combo_safeammocheck)) // true if you can fire at least one secondary blob AND one primary shot after it, otherwise false.
503     {
504         ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
505         ammo_amount += self.(weapon_load[WEP_ELECTRO.m_id]) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
506     }
507     else
508     {
509         ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR_SEC(electro, ammo);
510         ammo_amount += self.(weapon_load[WEP_ELECTRO.m_id]) >= WEP_CVAR_SEC(electro, ammo);
511     }
512     return ammo_amount;
513 }
514 METHOD(Electro, wr_resetplayer, void(entity thiswep))
515 {
516     self.electro_secondarytime = time;
517 }
518 METHOD(Electro, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
519 {
520     W_Reload(self, min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND(RELOAD));
521 }
522 METHOD(Electro, wr_suicidemessage, int(entity thiswep))
523 {
524     if(w_deathtype & HITTYPE_SECONDARY)
525         return WEAPON_ELECTRO_SUICIDE_ORBS;
526     else
527         return WEAPON_ELECTRO_SUICIDE_BOLT;
528 }
529 METHOD(Electro, wr_killmessage, int(entity thiswep))
530 {
531     if(w_deathtype & HITTYPE_SECONDARY)
532     {
533         return WEAPON_ELECTRO_MURDER_ORBS;
534     }
535     else
536     {
537         if(w_deathtype & HITTYPE_BOUNCE)
538             return WEAPON_ELECTRO_MURDER_COMBO;
539         else
540             return WEAPON_ELECTRO_MURDER_BOLT;
541     }
542 }
543
544 #endif
545 #ifdef CSQC
546
547 METHOD(Electro, wr_impacteffect, void(entity thiswep))
548 {
549     vector org2;
550     org2 = w_org + w_backoff * 6;
551     if(w_deathtype & HITTYPE_SECONDARY)
552     {
553         pointparticles(EFFECT_ELECTRO_BALLEXPLODE, org2, '0 0 0', 1);
554         if(!w_issilent)
555             sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
556     }
557     else
558     {
559         if(w_deathtype & HITTYPE_BOUNCE)
560         {
561             // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
562             pointparticles(EFFECT_ELECTRO_COMBO, org2, '0 0 0', 1);
563             if(!w_issilent)
564                 sound(self, CH_SHOTS, SND_ELECTRO_IMPACT_COMBO, VOL_BASE, ATTEN_NORM);
565         }
566         else
567         {
568             pointparticles(EFFECT_ELECTRO_IMPACT, org2, '0 0 0', 1);
569             if(!w_issilent)
570                 sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
571         }
572     }
573 }
574
575 #endif
576 #endif